Last active
March 13, 2020 19:15
-
-
Save saschwarz/318b7e82d70c1a4c12fd615d1007ecb9 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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
const dogTrainingMachine = Machine({ | |
id: 'dogTraining', | |
initial: 'bored', | |
context: { | |
}, | |
states: { | |
bored: { | |
on: { | |
LETS_PLAY: 'door' | |
} | |
}, | |
door: { | |
on: { | |
OPEN: 'play', | |
CLOSE: 'bored' | |
} | |
}, | |
play: { | |
on: { | |
INSIDE: 'bored' | |
} | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment