Skip to content

Installation

Install the Wirestate packages for the stack you use.

The commands below list Wirestate packages only. Modern package managers resolve React, Lit, MobX, and Signals peers. If your package manager reports a missing peer, install that package directly.

Packages

StackPackages
Core only@wirestate/core
React@wirestate/core @wirestate/react
Lit@wirestate/core @wirestate/lit
React + Signals@wirestate/core @wirestate/react @wirestate/signals @wirestate/react-signals
React + MobX@wirestate/core @wirestate/react @wirestate/mobx @wirestate/react-mobx
Lit + Signals@wirestate/core @wirestate/lit @wirestate/signals @wirestate/lit-signals
Lit + MobX@wirestate/core @wirestate/lit @wirestate/mobx @wirestate/lit-mobx

Signal services use the framework-agnostic @wirestate/signals package. MobX services use @wirestate/mobx. The same service definitions can be shared across React and Lit.

For external API details, use the official docs for React, Lit, Preact Signals, and MobX.

React + Signals

bash
npm install @wirestate/core @wirestate/signals @wirestate/react @wirestate/react-signals

React + MobX

bash
npm install @wirestate/core @wirestate/mobx @wirestate/react @wirestate/react-mobx

Lit + Signals

bash
npm install @wirestate/core @wirestate/signals @wirestate/lit @wirestate/lit-signals

Lit + MobX

bash
npm install @wirestate/core @wirestate/mobx @wirestate/lit @wirestate/lit-mobx

TypeScript

Wirestate decorators work with legacy TypeScript decorators and TC39 standard decorators. For legacy TypeScript decorators, enable experimentalDecorators.

json
{
  "compilerOptions": {
    "experimentalDecorators": true
  }
}

Next Steps