Skip to content

wirestate-react

Commands

NameDescription
CommandExecutorRepresents the function returned by useCommandExecutor.
OptionalCommandExecutorRepresents the function returned by useOptionalCommandExecutor.
useCommandExecutorReturns a stable function to dispatch commands on the active container.
useCommandHandlerRegisters a command handler for the component's lifetime.
useOptionalCommandExecutorReturns a stable function to dispatch optional commands on the active container.

Context

FunctionDescription
useContainerReturns the active container from the context.
useScopeReturns a WireScope instance bound to the active container.

Events

NameDescription
EventEmitterRepresents the function returned by useEventEmitter.
useEventSubscribes a component to a specific event type on the EventBus.
useEventEmitterReturns a stable function to emit events via the EventBus.
useEventsSubscribes a component to multiple event types on the EventBus.
useEventsHandlerSubscribes a component to all events on the EventBus without type filtering.

Injection

FunctionDescription
useInjectionResolves a service or constant from the active container.
useOptionalInjectionSafely resolves a value from the container, returning a fallback or null if not bound.

Provision

NameDescription
ContainerProviderPropsRepresents props for ContainerProvider.
SubContainerProviderPropsRepresents props for SubContainerProvider.
ContainerProviderProvides a root Wirestate container to a React subtree.
SubContainerProviderProvides a managed child container under the nearest parent container.

Queries

NameDescription
AsyncQueryExecutorRepresents the function returned by useAsyncQueryExecutor.
OptionalAsyncQueryExecutorRepresents the function returned by useOptionalAsyncQueryExecutor.
OptionalQueryExecutorRepresents the unction returned by useOptionalQueryExecutor.
QueryExecutorRepresents the function returned by useQueryExecutor.
QueryResponderRepresents the function that answers a query.
useAsyncQueryExecutorReturns a stable function to dispatch async-capable queries on the active container.
useOptionalAsyncQueryExecutorReturns a stable function to dispatch optional async-capable queries on the active container.
useOptionalQueryExecutorReturns a stable function to dispatch optional synchronous queries on the active container.
useQueryExecutorReturns a stable function to dispatch synchronous queries on the active container.
useQueryHandlerRegisters a query handler for the component's lifetime.