Skip to content

Instantly share code, notes, and snippets.

@tmlangley
Created September 17, 2020 16:32
Show Gist options
  • Save tmlangley/f136f87e7a397d9ad8bb640d3848e638 to your computer and use it in GitHub Desktop.
Save tmlangley/f136f87e7a397d9ad8bb640d3848e638 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 resultsDisplay = Machine({
id: 'display',
initial: 'properties',
states: {
properties: {
on: {
SHOW_TRIPS: 'trips',
SHOW_MAP: 'trips.map',
}
},
trips: {
on: {
SHOW_PROPERTIES: 'properties',
SHOW_MAP: 'trips.map',
},
states: {
map: {
SHOW_TRIPS: 'trips',
SHOW_PROPERTIES: 'properties',
SHOW_MAP: 'trips.map',
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment