Skip to content

Instantly share code, notes, and snippets.

@joystick
Created April 29, 2021 08:31
Show Gist options
  • Select an option

  • Save joystick/6940ba8395e245c44fe3b216156a3cd3 to your computer and use it in GitHub Desktop.

Select an option

Save joystick/6940ba8395e245c44fe3b216156a3cd3 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 twodMachine = Machine({
id: 'twod',
type: 'parallel',
context: {
tab: 'extractor'
},
states: {
extractor: {
id: 'extractor',
initial: 'hydrate',
states: {
hydrate: {}
}
},
settings: {
id: 'settings',
initial: 'display',
states: {
display: {
on: {
EDIT: 'edit'
}
},
edit: {
on: {
SAVE: 'display',
CANCEL: 'display'
}
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment