Some libraries (e.g. KStateMachine, Workflow) enforce valid state transitions at compile time or provide strict state machine DSLs to prevent emitting invalid states.
Ideas:
- Provide an overlay, plugin, or an extension DSL for
Store that defines valid FromState -> ToState transitions.
- Throw an exception (or fail to compile) if an invalid state is emitted.
- This would be extremely useful for workflows that strictly require a linear or predictable path (e.g.
Loading -> Content only, preventing Content -> Loading).