beat 0.6.2 copy "beat: ^0.6.2" to clipboard
beat: ^0.6.2 copied to clipboard

discontinued
outdated

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.

Roadmap - Features compatible with xstate.js #

A roadmap is as follows, but not in the exact order.

  • ✅ Support simple state transition without context
  • ✅ Listen on state and context changes
  • ✅ Map states
  • ✅ Execute callback on state change
  • ✅ Support reset
  • ✅ Support context
    • ✅ Initialize with context
      • ✅ Get current context
      • ✅ assign new context
  • ✅ Support transition with an argument
  • ❌ Support delay
  • ❌ Support actions (fire-and-forget)
    • ✅ callback action
      • ✅ assign action
      • ✅ callback action with variable length of arguments
      • ❌ choose action
      • ❌ forwardTo action
      • ❌ log action
      • ❌ pure action
      • ❌ raise action
      • ❌ respond action
      • ❌ send action
  • ❌ Support invoking services
    • ✅ async function (or Future)
      • ❌ callback
      • ❌ observables
      • ❌ other beat station
      • ❌ multiple services
  • ❌ Support entry and exit event
  • ❌ Support conditional (guarded) transition
    • ❌ Support custom functions
      • ❌ Support in state condition
  • ❌ Support eventless(always) transition
  • ❌ Support internal transition
  • ❌ Support external transition
  • ❌ Support multiple targets
  • ✅ Support any state transition
    • ✅ BeatStation with common Beat option
  • ❌ Support actors
  • ✅ Support state.matches as a is{State}
  • ❌ Support state.nextEvents
  • ❌ Support state.changed
  • ❌ Support state.done
  • ❌ Support state.meta, state.tags
  • ✅ Support state change history
  • ❌ Support history json to persist
    • toString() is supported
  • ❌ Support nested state
  • ❌ Support parallel state
    • ❌ Define parallel state
      • ❌ Support multiple targets event
  • ❌ Support scxml
  • ❌ 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 Beat annotation
  • state.toString(): naturally supported
  • state.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

Usage #

1
likes
0
points
6
downloads

Publisher

verified publisherbeatly.dev

Weekly Downloads

A set of annotations for beat state management. Heavily inspired by xstate.js.org

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on beat