Skip to content

Instantly share code, notes, and snippets.

@tmlangley
Created April 30, 2020 15:57
Show Gist options
  • Save tmlangley/25cd6a144097c477d2eb61f0d6428c02 to your computer and use it in GitHub Desktop.
Save tmlangley/25cd6a144097c477d2eb61f0d6428c02 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 pageMachine = Machine({
id: 'homepage',
initial: 'idle',
context: {
retries: 0
},
states: {
idle: {
on: {
REGISTRATION_OPEN: 'registrationOpen',
FILTER_OPEN: 'editingFilters',
MENU_OPEN: 'menuModalOpen'
}
},
editingFilters: {
on: {
FILTER_CLOSE: 'idle'
}
},
registrationOpen: {
on: {
REGISTRATION_CLOSE: 'idle'
}
},
menuModalOpen: {
on: {
MENU_CLOSE: 'idle'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment