Last active
November 17, 2021 08:17
-
-
Save j0k3r/ffb82e3f4bb00eb46b7c33821c7dd039 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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