Last active
November 27, 2019 19:52
-
-
Save alexcarpenter/cf8a1d061590e999f5851758b4afbb69 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
const animationMachine = Machine({ | |
id: 'animation', | |
initial: 'drafted', | |
states: { | |
drafted: { | |
on: { | |
RUN: 'running', | |
ARCHIVE: 'archived' | |
} | |
}, | |
running: { | |
on: { | |
PAUSE: 'paused', | |
COMPLETE: 'completed' | |
} | |
}, | |
paused: { | |
on: { | |
RESUME: 'running', | |
ARCHIVE: 'archived' | |
} | |
}, | |
completed: { | |
on: { | |
ARCHIVE: 'archived' | |
} | |
}, | |
archived: { | |
type: 'final' | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment