Skip to content

Instantly share code, notes, and snippets.

@Baael
Created August 12, 2021 09:57
Show Gist options
  • Save Baael/b4c8334b32a8e9c517c52007c6ff2be5 to your computer and use it in GitHub Desktop.
Save Baael/b4c8334b32a8e9c517c52007c6ff2be5 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
initial: "creation",
states: {
creation: { on : { DRAFT: "draft" }},
draft: { on : { PUBLISHED: "published" }},
published: { on : { PDF_DOWNLOAD: "pdfDownload" }},
pdfDownload: { on : { PRINTED: "printed" }},
printed: { on : { SIGN_THE_PRINTED_T_E_C: "signThePrintedTEC" }},
signThePrintedTEC: { on : { SIGNED_AND_SCANNED: "signedAndScanned" }},
signedAndScanned: { on : { SEND_BY_POST: "sendByPost" }},
sendByPost: { on : { SEND_BY_EMAIL: "sendByEmail" }},
sendByEmail: { on : { RECEIVED_AND_SCANNED: "receivedAndScanned" }},
receivedAndScanned: { on : { APPROVED: "approved" }},
approved: { on : { UPLOAD: "upload" }},
upload: { type: "final" },
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment