Given an fsm description of how users should be able to navigate between states:
Watches for dispatch
and dispatchInput
events, interprets the first argument to be the action type, and when it sees one it has a command for, it tells the abstract-state-router to navigate to that state (inheriting all parameters from the current state).
const asrFsmNavigation'asr-fsm-navigation' const makeAsrStateWatcher = const stateWatcher = const startFsmNavigation = var stopNavigating =
If the user is at the parent1.child1 state and dispatches a GO_TO_PARENT2_CHILD1 event, the module will navigate to the parent2.child1 state.
State navigation options
You can pass in an options object when you start the navigator. Defaults to { inherit: true }
.
const startFsmNavigation =
Querystring parameters
For each action, you can specify particular parameter values that will be set when navigating to the next state.
To do this, give an object with name/parameters parameters, instead of a string for a state destination:
const startFsmNavigation =