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
| Stack | Packages |
|---|---|
| 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
npm install @wirestate/core @wirestate/signals @wirestate/react @wirestate/react-signalsSee the React Signals overview for services, components, and transform setup.
React + MobX
npm install @wirestate/core @wirestate/mobx @wirestate/react @wirestate/react-mobxSee the React MobX overview for services, components, and computed state.
Lit + Signals
npm install @wirestate/core @wirestate/signals @wirestate/lit @wirestate/lit-signalsSee the Lit Signals overview for services, templates, and computed signals.
Lit + MobX
npm install @wirestate/core @wirestate/mobx @wirestate/lit @wirestate/lit-mobxSee 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.
{
"compilerOptions": {
"experimentalDecorators": true
}
}Next Steps
- Start with Core overview for services and containers.
- Use React overview for React applications.
- Use Lit overview for Lit applications.
- Use React Signals, React MobX, Lit Signals, or Lit MobX for framework reactivity packages.