Getting Started
Install Aquaman from NPM:
Aquaman provides Redux middleware.
You'll need to provide mapReduxToConfig
and your aquamanFlows
.
Aquaman provides four actions creators for your connected components to interact with flows:
aquamanNext
aquamanPrevious
aquamanClose
aquamanForceFlow
aquamanNext
aquamanNext
is your primary action creator for Aquaman. When dispatched, it causes your flow to step forward.
It optionally receives an argument, which can be used for branching, or for passing data to the next step.
aquamanPrevious
Aquaman allows you to have back buttons in your components that will allow the user to traverse backwards through a flow. Dispatch aquamanPrevious
to do so.
aquamanClose
Dispatching aquamanClose
will exit out of whatever flow is active before it's completed. Attach this to a close button so users can end the flow early.
aquamanForceFlow
aquamanForceFlow
will allow you to activate a particular flow from a user action (such as clicking a button) rather than from entering a particular state. The key
here is defined in your flow table and will be unique to the action series.
By default, aquamanForceFlow
will stop whatever flow the user is in and start the selected one. You can optionally pass a second argument soft
to prevent the forced flow from being started if there is another flow in progress.
Last updated
Was this helpful?