Skip to content

Instantly share code, notes, and snippets.

@tklepzig
Created September 30, 2020 10:54
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 tklepzig/3be59851512f44a340a4cd493a544308 to your computer and use it in GitHub Desktop.
Save tklepzig/3be59851512f44a340a4cd493a544308 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const alivePing = Machine({
id: "alivePing",
initial: "enabled",
states: {
enabled: {
on: {
DISABLE: "disabled",
ALIVE_PING: {
target: "enabled",
actions: actions.cancel("delay")
}
},
after: {
5000: {target: "disabled", id: "delay"}
}
},
disabled: {}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment