Skip to content

Instantly share code, notes, and snippets.

@gseguin
Last active June 2, 2021 22:17
Show Gist options
  • Save gseguin/4465a33ccdb220dc3eb1b2cfad71e2bd to your computer and use it in GitHub Desktop.
Save gseguin/4465a33ccdb220dc3eb1b2cfad71e2bd 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 enrollmentMachine = Machine({
id: 'enrollment',
initial: 'zipcode',
context: {
retries: 0
},
states: {
zipcode: {
on: {
NEXT: 'utility_selection'
}
},
utility_selection: {
on: {
NEXT: 'gaia',
PREV: 'zipcode',
}
},
gaia: {
on: {
CONTINUE: 'structure_selection',
CHANGE: 'gaia_id_selection',
}
},
structure_selection: {
on: {
NEXT: 'join_base_tier'
}
},
gaia_id_selection: {
on: {
NEXT: 'structure_selection'
}
},
join_base_tier: {}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment