Last active
September 8, 2021 19:49
-
-
Save noisy/773a77a1e7931cac2764629393df4956 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ | |
id: 'light', | |
initial: 'unseen', | |
context: { | |
elapsed: 0, | |
direction: 'east' | |
}, | |
states: { | |
unseen: { | |
on: { | |
SCRAPING_STARTED: 'scraping.initial' | |
} | |
}, | |
scraping: { | |
states: { | |
initial: { | |
on: { | |
SCRAPING_FORWARD_REQUEST: 'scrapingForwardRequest', | |
SCRAPING_REPORT_MAIL: 'scrapingReportMail', | |
} | |
}, | |
scrapingForwardRequest: { | |
}, | |
scrapingReportMail: { | |
} | |
} | |
}, | |
scraped: { | |
states: { | |
mailIgnored: {}, | |
reportUploaded: {}, | |
forwardRequestConfirmed: {}, | |
} | |
}, | |
error: { | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment