Design decisions
every action has a reaction
Async: every function that mutates state returns a Promise. How to handle success or failure is up to the user.
Boilerplate: reduced in every aspect of it, either in the creation of the state graph, actions, outputs or state observers.
Descriptive: allowing the reader to perceive the possible states and actions, provides a quicker modelling and interpretation of the underlying business.
Idiomatic: either in the terms of the language itself or from the api it provides, it should be concise, pragmatic and adjusted to the chosen machine type constructor. Choosing a Mealy state machine could offer a different api and validations from a Moore state machine.
Simple: the configuration is based on JavaScript objects.
State holds data: data mutations are contained within the state transitions and actions. Is up to the user to know when and how to use it.
Last updated
Was this helpful?