Skip to content

Instantly share code, notes, and snippets.

@ljx213101212
Last active April 30, 2021 09:41
Show Gist options
  • Save ljx213101212/051269b94512888f30cdc8dafc6725f4 to your computer and use it in GitHub Desktop.
Save ljx213101212/051269b94512888f30cdc8dafc6725f4 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const holdMachine = Machine({
id: "hold",
type: "parallel",
states: {
clutch: {
initial: "off",
states: {
on: {
on: {
CLUTCH_OFF: "off"
}
},
off: {
on: {
CLUTCH_ON: "on",
},
},
},
},
otfs: {
initial: "off",
states: {
on: {
on: {
OTFS_OFF: "off"
}
},
off: {
on: {
OTFS_ON: "on",
},
}
},
},
otfm: {
initial: "off",
states: {
on: {
on: {
OTFM_OFF: "off"
}
},
off: {
on: {
OTFM_ON: "on"
}
}
}
}
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment