Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Available variables:
- // - Machine
- // - interpret
- // - assign
- // - send
- // - sendParent
- // - spawn
- // - raise
- // - actions
- // - XState (all XState exports)
- const elevatorMachine = Machine({
- key: "door",
- initial: "closed",
- states: {
- closed: {
- on: {
- OPEN: "open",
- LOCK: "locked"
- }
- },
- open: {
- on: {
- CLOSE: "closed"
- }
- },
- locked: {
- on: {
- UNLOCK: "closed"
- }
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement