Comparison of Robot and XState for basic concepts and API features.
The basic test scenario for both is a state machine imaginable for a Sci-Fi game, where players have a space ship which can activate a shield (limited times).
Besides that, some arbitrary advanced concepts are tested and experimented on.
- Run via Browser -or- NPM (see script commands)
- Robot: https://thisrobot.life
- XState: https://xstate.js.org
- Order of functions in transitions matter, e.g. with a guard in the first, if this fails the second will be called (for the same command)
- Nested machines with a single service seem hard to debug/test
- There is probably a better way ...?
- Nested machine states can propagate to parents, if unhandled by the current state