Skip to content

Instantly share code, notes, and snippets.

@cosmith
Created November 26, 2020 13:41
Show Gist options
  • Save cosmith/51c91ca6b1676446a4c5bc49dd946b7e to your computer and use it in GitHub Desktop.
Save cosmith/51c91ca6b1676446a4c5bc49dd946b7e to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: 'Transport Status',
initial: 'created',
states: {
created: {
on: {
updated: 'created'
}
},
created: {
on: {
order_confirmed: 'confirmed',
order_declined: 'declined',
cancelled: 'cancelled'
}
},
confirmed: {
on: {
assigned: 'ongoing'
}
},
ongoing: {
on: {
all_activities_done: 'done'
}
},
cancelled: {
type: 'final'
},
declined: {
type: 'final'
},
done: {
type: 'final'
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment