Skip to content

Instantly share code, notes, and snippets.

@jacobparis
Last active April 5, 2020 02:15
Show Gist options
  • Save jacobparis/b9a8e4db654cea07fe2080bd56b6cdc7 to your computer and use it in GitHub Desktop.
Save jacobparis/b9a8e4db654cea07fe2080bd56b6cdc7 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 formatMachine = Machine({
id: 'format',
type: 'parallel',
states: {
bold: {
initial: 'off',
states: {
on: {
on: {
BOLD: 'off'
}
},
off: {
on: {
BOLD: 'on'
}
}
}
},
italic: {
initial: 'off',
states: {
on: {
on: {
ITALICIZE: 'off'
}
},
off: {
on: {
ITALICIZE: 'on'
}
}
}
},
underlined: {
initial: 'off',
states: {
on: {
on: {
UNDERLINE: 'off'
}
},
off: {
on: {
UNDERLINE: 'on'
}
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment