wirestate-react
React integration APIs for providers, injection hooks, and component-scoped message handlers.
Commands
| Function | Description |
|---|---|
| useOnCommand | Registers a command handler for the component's lifetime. |
Container
| Name | Description |
|---|---|
| ContainerContext | React context carrying the container. |
| useContainer | Returns the active container from the context. |
Events
| Function | Description |
|---|---|
| useOnEvents | Subscribes the component to events on the active container's EventBus. |
Injection
| Name | Description |
|---|---|
| InjectionFallback | A fallback for an optional injection: a raw value or a (container) => value factory, used only when the token is not bound. |
| useInjection | Resolves a required value from the active container. |
Provision
| Name | Description |
|---|---|
| ContainerProviderProps | Describes props for ContainerProvider. |
| ContainerProvider | Provides a root Wirestate container to a React subtree. |
Queries
| Function | Description |
|---|---|
| useOnQuery | Registers a query handler for the component's lifetime. |