Skip to content

Instantly share code, notes, and snippets.

@s-o-r-o-u-s-h
Created May 21, 2021 08:38
Show Gist options
  • Select an option

  • Save s-o-r-o-u-s-h/3a7a71f2e056e2e221ba367a1600ddfe to your computer and use it in GitHub Desktop.

Select an option

Save s-o-r-o-u-s-h/3a7a71f2e056e2e221ba367a1600ddfe 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: 'Checking Area',
initial: 'not_checked',
context: {
retries: 0
},
states: {
not_checked: {
on: {
primarily_ok: 'initially_ok',
not_ok_washing: 'lift_to_Damaged_washing',
not_ok_repairing: 'lift_to_Damaged_repairing',
}
},
initially_ok: {
on: {
not_ok_washing: 'lift_to_Damaged_washing',
not_ok_repairing: 'lift_to_Damaged_repairing',
is_ok: 'lift_to_Healthy'
}
},
lift_to_Damaged_washing: {
type: 'final'
},
lift_to_Damaged_repairing: {
type: 'final'
},
lift_to_Healthy: {
type: 'final'
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment