The action object
The id of the container to which the action should be dispatched. If the container is not registered, the function will print a message, but will not throw an error.
Optional
immediateImplements advanced scenario, in most cases you can ignore this.
Sets some selected attributes to state "immediately"
before waiting for action
to get completely executed.
The immediateState
is a kind of "promise" the
state (whole or particular attributes) will look like declared
AFTER the action gets executed (await reducer()
call gets done).
Where it can be useful: in some of the React "asynchronous" aspects,
where getContainer()
calls might return inappropriate state.
Generated using TypeDoc
Dispatches an action to the state container (registered with the given
containerId
).You can invoke this function from anywhere in your application, in hook context or outside of it. There is no need for action creators or any other boilerplate.
If there is no container registered, function would print (but not throw) an error. So, effectively, the function call in such case gets ignored.