Skip to content

Instantly share code, notes, and snippets.

@decaylala
Last active September 22, 2020 03:56
Show Gist options
  • Save decaylala/b0328f2bc2eaad1492cdc6d3b55736a5 to your computer and use it in GitHub Desktop.
Save decaylala/b0328f2bc2eaad1492cdc6d3b55736a5 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const machine = Machine({
id: 'companyOperatingStatus',
initial: 'establishing',
states: {
establishing: {
on: {
CANCEL: 'not_simpany_customer',
ESTABLISHED: 'operating',
},
},
not_simpany_customer: {
on: {
PAY_DEPOSIT: 'establishing',
},
},
operating: {
on: {
STOP: 'stopped',
LEAVE: 'left',
ANNUL: 'annulled',
},
},
stopped: {
on: {
REOPERATE: 'operating',
},
},
left: {
on: {
BACK: 'operating',
},
},
annulled: {
type: 'final',
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment