Last active
June 2, 2021 22:17
-
-
Save gseguin/4465a33ccdb220dc3eb1b2cfad71e2bd to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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