Where the action happens

When creating your FSM you need to be thinking about how state transitions will affect your application and how to apply those state transitions.

Essentially you need to wire the FSM into your application.

FSM2 has a number key tools you should look to when wiring a FSM into your app.

Using the above tools allows your application to 'react' to state changes.

By placing handlers at any of the above connection points you can use state changes to trigger virtually anything.

Some examples might be:

  • ui updates

  • database updates

  • fetch data

  • trigger a route change

  • send a text message

Last updated