Skip to content

Instantly share code, notes, and snippets.

@LevelbossMike
Created July 14, 2021 11:20
Show Gist options
  • Save LevelbossMike/4a7e86e3ba099fb8146b686160d04966 to your computer and use it in GitHub Desktop.
Save LevelbossMike/4a7e86e3ba099fb8146b686160d04966 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
Machine({
initial: 'pageA',
states: {
pageA: {
initial: 'unknown',
states: {
unknown: {
on: {
'': [
{ target: 'rehydrated', cond: 'hasRehydratableState' },
{ target: 'blank' }
]
}
},
rehydrated: {},
blank: {}
},
exit: [
'persistState'
],
on: {
NAVIGATE_AWAY: 'pageB'
}
},
pageB: {}
}
}, {
actions: {
persistState() {}
},
guards: {
hasRehydratableState() {}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment