Skip to content

Instantly share code, notes, and snippets.

@allencoded
Created June 26, 2020 07:28
Show Gist options
  • Save allencoded/98fec4bbb09607dfdb60f8914580c099 to your computer and use it in GitHub Desktop.
Save allencoded/98fec4bbb09607dfdb60f8914580c099 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: 'pathway',
initial: 'introScreen',
context: {
retries: 0
},
states: {
introScreen: {
on: {
RISK: 'riskScreen'
}
},
riskScreen: {
on: {
DISCHARGE: 'dischargeScreen',
ADMIT: 'admitScreen'
}
},
dischargeScreen: {
type: 'final'
},
admitScreen: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment