Skip to content

Instantly share code, notes, and snippets.

@tom-sherman
Created August 5, 2021 13:00
Show Gist options
  • Save tom-sherman/7cce496b29b5bc763214b5b81547ab93 to your computer and use it in GitHub Desktop.
Save tom-sherman/7cce496b29b5bc763214b5b81547ab93 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 initialiseMachine = Machine({
id: 'mxpnlInitialise',
initial: 'idle',
states: {
idle: {
on: {
INITIALISE: 'initialising'
}
},
initialising: {
invoke: {
src: () => Mixpanel.initialise(),
onDone: 'initialised'
}
},
initialised: {
type: 'final',
invoke: {
src: () => queue.forEach(track)
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment