Code Examples
by bradwoods.io
News
Minimal code examples of library concepts.
XState
r3f
React-Spring
Vanilla JS
react
Action
Action - conditional (guard)
Action - when changing state
Action - when entering state
Action - when exiting state
Activity
Log an Action
Actor
Spawn - a callback
Spawn - a machine
Unspawn an Actor
Context
Context
Event
Auto-Forward Events
Forward Event
Respond to Event
Send Event - between actors
Send Event - delayed
Send Event - to all actors
Send Event - to an actor
Send Event - to an interpreted machine
Send Event - to an invoked machine
Send Event - to an invoked machine (guard)
Send Event - to parent
Extending Machine
withConfig
withContext
Meta
Meta
Persisting State
Persisting State
Service
Invoke - a callback
Invoke - a machine
Invoke - a promise
State Node
Final
Hierarchical
History
Parallel
Single
Transient State
Transition
Transition
Transition - conditional (guard)
Transition - delayed