Skip to content

Instantly share code, notes, and snippets.

@franciscoaguirre
Created November 4, 2021 21:14
Show Gist options
  • Select an option

  • Save franciscoaguirre/ac011f1671488c9afb610e16b0f6955b to your computer and use it in GitHub Desktop.

Select an option

Save franciscoaguirre/ac011f1671488c9afb610e16b0f6955b 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 inboxMachine = Machine({
id: 'inbox',
initial: 'channelList',
context: {
channel: undefined,
},
states: {
channelList: {
on: {
SELECT: 'channel',
SEND_TO_MANY: 'sendToMany',
},
},
channel: {
on: {
BACK: 'channelList',
},
},
sendToMany: {
on: {
BACK: 'channelList'
},
},
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment