Skip to content

Instantly share code, notes, and snippets.

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