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

See the React Signals overview for services, components, and transform setup.

React + MobX

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

See the React MobX overview for services, components, and computed state.

Lit + Signals

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

See the Lit Signals overview for services, templates, and computed signals.

Lit + MobX

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

See the Lit MobX overview for services, elements, and computed state.

TypeScript

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

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

Next Steps