Skip to content

Instantly share code, notes, and snippets.

@jiayihu
Created October 23, 2019 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jiayihu/5681efa629654c621ed3c347fd5639a8 to your computer and use it in GitHub Desktop.
Save jiayihu/5681efa629654c621ed3c347fd5639a8 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({
id: 'menu',
initial: 'closed',
states: {
open: {
on: {
CLOSE: 'closed'
}
},
closed: {
on: {
OPEN: 'animating'
}
},
animating: {
on: {
END_ANIMATION: 'open'
}
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment