Skip to content

Instantly share code, notes, and snippets.

@j0k3r
Last active November 17, 2021 08:17
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 j0k3r/ffb82e3f4bb00eb46b7c33821c7dd039 to your computer and use it in GitHub Desktop.
Save j0k3r/ffb82e3f4bb00eb46b7c33821c7dd039 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'proofreading',
initial: 'unread',
states: {
unread: {
on: {
ASK_PROOFREADING: 'submitted_proofreading',
},
},
submitted_proofreading: {
on: {
PROCEED_PROOFREADING: 'under_proofreading',
CANCEL_PROOFREADING: 'unread',
},
},
under_proofreading: {
on: {
NEED_CORRECTION: 'correction_needed',
VALIDATE: 'reread',
},
},
correction_needed: {
on: {
ASK_PROOFREADING: 'submitted_proofreading',
},
},
reread: {
on: {
ASK_PROOFREADING: 'submitted_proofreading',
},
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment