Skip to content

Instantly share code, notes, and snippets.

@dustinfreeman
Created January 15, 2020 22:26
Show Gist options
  • Save dustinfreeman/8faadf4fa72c39cead7955345fb92f19 to your computer and use it in GitHub Desktop.
Save dustinfreeman/8faadf4fa72c39cead7955345fb92f19 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: 'fetch',
initial: 'idle',
states: {
idle: {
on: {
'System Initiated': 'reactive'
}
},
reactive: {
on: {
'wait 10 s': 'idle',
'thumbs up': 'full'
}
},
full: {
type: 'final',
on: {
'sleep': 'idle'
}
},
'impossible state': {
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment