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
bash
npm install @wirestate/core @wirestate/signals @wirestate/react @wirestate/react-signalsReact + MobX
bash
npm install @wirestate/core @wirestate/mobx @wirestate/react @wirestate/react-mobxLit + Signals
bash
npm install @wirestate/core @wirestate/signals @wirestate/lit @wirestate/lit-signalsLit + MobX
bash
npm install @wirestate/core @wirestate/mobx @wirestate/lit @wirestate/lit-mobxTypeScript
Wirestate decorators work with legacy TypeScript decorators and TC39 standard decorators. For legacy TypeScript decorators, enable experimentalDecorators.
json
{
"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.