Skip to content

Instantly share code, notes, and snippets.

@gltovar
Last active September 22, 2019 23:32
Show Gist options
  • Save gltovar/815b6c93b8aa1e7c27e673a0bdacb788 to your computer and use it in GitHub Desktop.
Save gltovar/815b6c93b8aa1e7c27e673a0bdacb788 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 contestantInfoPreshow = Machine({
id: 'contestantInfoPreshow',
initial: 'idle',
context: {
ready: false
},
states: {
idle:{
on: {
RECEIVE_INFO: 'displayInfo'
}
},
displayInfo: {
on:{
TOGGLE_READY:{
target:"displayInfo",
actions: assign({
ready: (context, event) => !(context.ready)
})
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment