Skip to content

Instantly share code, notes, and snippets.

@tivac
Created July 29, 2020 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tivac/271d48802304f66b16b1c879cf725dfa to your computer and use it in GitHub Desktop.
Save tivac/271d48802304f66b16b1c879cf725dfa 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 machine = Machine({
id: 'delay',
initial: 'idle',
states: {
idle: {
on: {
QUEUE: {
actions : send("GO", { delay : 2000 }),
},
GO : "gone",
},
},
gone: {},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment