Skip to content

Instantly share code, notes, and snippets.

@bierlingm
Created May 7, 2020 21:16
Show Gist options
  • Select an option

  • Save bierlingm/b96b1b36ef050782e1bf706691f6cf34 to your computer and use it in GitHub Desktop.

Select an option

Save bierlingm/b96b1b36ef050782e1bf706691f6cf34 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 writingSessionMachine = Machine({
id: 'writingSession',
initial: 'ready',
states: {
ready: {
on: {
START: 'writing',
},
},
writing: {
on: {
STOP: 'ready',
},
after: {
90000: 'ready',
},
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment