Skip to content

Instantly share code, notes, and snippets.

@prakaashkpk
Created June 13, 2020 17:18
Show Gist options
  • Save prakaashkpk/6c51641fcda7eaede34772afbb40dc79 to your computer and use it in GitHub Desktop.
Save prakaashkpk/6c51641fcda7eaede34772afbb40dc79 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: 'ingest',
initial: 'Idle',
states: {
Idle: {
on: {
InvokeExtract: 'Extracting',
Failure: 'Error'
}
},
Extracting: {
on: {
Success: 'Ingested',
Failure: 'Error'
}
},
Error: {},
Ingested: {
on: {
Failure: 'Error'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment