Skip to content

Instantly share code, notes, and snippets.

@Glutnix
Created February 3, 2020 00:09
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 Glutnix/e1ffe79f51c84b9c347ebc6ce789673b to your computer and use it in GitHub Desktop.
Save Glutnix/e1ffe79f51c84b9c347ebc6ce789673b 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 toggleMachine = Machine({
id: "toggle",
initial: "inactive",
states: {
inactive: {
on: {
TOGGLE: "active"
}
},
active: {
on: {
TOGGLE: "inactive"
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment