beat 0.3.0
beat: ^0.3.0 copied to clipboard
A set of annotations for beat state management. Heavily inspired by xstate.js.org
Beat Station - State management with state machine #
Heavily inspired by xstate.js.
Go to the Beatly Book for more information.
Features compatible with xstate.js #
- ✅ Support simple state transition without context
- ✅ Listen on transition
- ✅ Map states
- ✅ Execute callback on state change
- ✅ Support reset
- ❌ Support context
- ✅ Initialize with context
- ✅ Get current context
- ✅ Support sync
assign - ✅ Support async
assign - ✅ Get current context
- ❌ Get immutable current context
- ❌ Support actor model
- ✅ Initialize with context
- ❌ Support transition with an argument for
assign - ❌ Support delay
- ❌ Support actions (fire-and-forget)
- ❌ Support
entryandexitevent - ❌ Support conditional (guraded) transition
- ❌ Support custom functions
- ❌ Support
instate condition
- ❌ Support
- ❌ Support custom functions
- ❌ Support Transient State Nodes
- ❌ Support external transition
- ✅ Support any state transition
- ✅ BeatStation with common
Beatoption
- ✅ BeatStation with common
- ❌ Support invoking services
- ❌ Support actors
- ❌ Support
state.matchesas ais{State} - ❌ Support
state.nextEventsas aenumandString - ❌ Support
state.changed,state.done - ❌ Support
state.meta,state.tags - ❌ Support state change history
- ❌ Support history json to persist
- ❌ Support nested state
- ❌ Support parallel state
- ❌ Define parallel state
- ❌ Support multiple targets event
- ❌ Define parallel state
- ❌ State transition with side effect
- ❌ Support scxml
- ❌ Support stately.ai
- ❌ Support bootstraping
- ❌ Support CLI/GUI tools
- ❌ xstate.js compatible beat station
Features not supported by this package but in xstate.js #
- Final state is naturally defined which does not have any
Beatannotation state.toString(): naturally supportedstate.can(event)is not needed because we have typed system- wildcard transitions and forbidden transitions are not needed because there will be no typo
Additionals for flutter #
- ❌ Support beat-statation-friendly flutter widgets
- ❌ Support
remix.run's concept- ❌
loader- ❌
action(side effect) - ❌
ErrorBoundary/CatchBoundary
- ❌
- ❌