Skip to content

Instantly share code, notes, and snippets.

@noisy
Last active September 8, 2021 19:49
Show Gist options
  • Save noisy/773a77a1e7931cac2764629393df4956 to your computer and use it in GitHub Desktop.
Save noisy/773a77a1e7931cac2764629393df4956 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// 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