Skip to content

Instantly share code, notes, and snippets.

@toddmoy
Last active November 26, 2019 05:25
Show Gist options
  • Save toddmoy/43655a45f54f4479b68baf4de4e57977 to your computer and use it in GitHub Desktop.
Save toddmoy/43655a45f54f4479b68baf4de4e57977 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 guide = Machine({
id: 'fetch',
initial: 'closed',
type: 'parallel',
states: {
closed: {
on: {
OPEN: 'maximize'
}
},
maximize: {
on: {
CLOSE: 'closed',
MINIMIZE: 'minimized'
}
},
minimized: {
on: {
MAXIMIZE: 'maximize',
CLOSE: 'closed'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment