Skip to content

wirestate-react ​

React integration APIs for providers, injection hooks, and component-scoped message handlers.

Commands ​

FunctionDescription
useOnCommandRegisters a command handler for the component's lifetime.

Container ​

NameDescription
ContainerContextReact context carrying the container.
useContainerReturns the active container from the context.

Events ​

FunctionDescription
useOnEventsSubscribes the component to every event on the active container's EventBus.

Injection ​

NameDescription
InjectionFallbackA fallback for an optional injection: a raw value or a (container) => value factory, used only when the token is not bound.
useInjectionResolves a required value from the active container.

Provision ​

NameDescription
ContainerProviderPropsDescribes props for ContainerProvider.
ContainerProviderProvides a root Wirestate container to a React subtree.

Queries ​

FunctionDescription
useOnQueryRegisters a query handler for the component's lifetime.