Skip to content

Instantly share code, notes, and snippets.

@TheSisb
Created December 9, 2019 05:36
Show Gist options
  • Save TheSisb/1922b1da6fd6e76774cf18ce6443d439 to your computer and use it in GitHub Desktop.
Save TheSisb/1922b1da6fd6e76774cf18ce6443d439 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: 'website-navigation',
initial: 'home',
states: {
home: {
on: {
ABOUT: 'about',
CONTACT: 'contact'
}
},
about: {
on: {
HOME: 'home',
CONTACT: 'contact'
}
},
contact: {
on: {
HOME: 'home',
ABOUT: 'about'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment