Skip to content

Instantly share code, notes, and snippets.

@Madumo
Last active April 2, 2020 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Madumo/34ce60d4615dd032654a700347634beb to your computer and use it in GitHub Desktop.
Save Madumo/34ce60d4615dd032654a700347634beb 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)
function isZ1() {}
const symptomsMachine = Machine({
id: 'nurseQuestionnary',
initial: 'b1',
context: {
answers: []
},
states: {
b1: {
on: {
'YES': 'b2',
'NO': 'b2'
}
},
b2: {
on: {
'YES': 'b3',
'NO': 'b3'
}
},
b3: {
on: {
'YES': 'b4',
'NO': 'z1'
}
},
b4: {
on: {
'YES': 'todo',
'NO': 'b5'
}
},
b5: {
on: {
'YES': 'z1',
'NO': 'z1'
}
},
todo: {
type: 'final'
},
z1: {
type: 'final'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment