invoke
If action and effect are null, it indicates the exception was thrown during state transition. If effect is null, it indicates the exception was thrown during action handling. If action is null, it indicates the exception was thrown during effect handling.
Return
The action to dispatch.
Parameters
state
The state before the transition.
action
The action that was dispatched.
effect
The effect that was triggered.
exception
The exception that was thrown.