Skip to content

Instantly share code, notes, and snippets.

@bryanjswift
Last active June 18, 2021 15:51
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 bryanjswift/3b8c934437d771cdb0d6fe1632a41bee to your computer and use it in GitHub Desktop.
Save bryanjswift/3b8c934437d771cdb0d6fe1632a41bee 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 chatModuleMachine = Machine({
id: 'chat',
initial: 'DISABLED',
states: {
DISABLED: {
on: {
ENABLE: 'FULL',
EMOJI_ONLY: 'EMOJI_ONLY',
REACTION_MODE: 'REACTION',
},
},
FULL: {
on: {
DISABLE: 'DISABLED',
EMOJI_ONLY: 'EMOJI_ONLY',
REACTION_MODE: 'REACTION',
},
},
EMOJI_ONLY: {
on: {
DISABLE: 'DISABLED',
ENABLE: 'FULL',
REACTION_MODE: 'REACTION',
},
},
REACTION: {
on: {
DISABLE: 'DISABLED',
ENABLE: 'FULL',
EMOJI_ONLY: 'EMOJI_ONLY',
},
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment