Created
November 23, 2019 21:30
-
-
Save yeehaa123/f7a236aae1907e2410489178ff350bcc to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Machine( | |
{ | |
id: "takeDeck", | |
context: { | |
controller: "", | |
cassette: null | |
}, | |
initial: "idle", | |
states: { | |
idle: { | |
on: { | |
POWER_ON: { | |
target: "empty", | |
} | |
}, | |
}, | |
empty: { | |
entry: "register", | |
on: { | |
INSERT: { | |
target: "loaded", | |
actions: "insertTape" | |
}, | |
POWER_OFF: { | |
target: "idle" | |
} | |
} | |
}, | |
loaded: { | |
entry: "echo", | |
on: { | |
RECORD: { | |
target: "recording" | |
}, | |
EJECT: { | |
target: "empty" | |
} | |
} | |
}, | |
recording: { | |
on: { | |
STOP: { | |
target: "loaded" | |
} | |
} | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment