Skip to content

Instantly share code, notes, and snippets.

@gltovar
Created August 20, 2020 23:19
Show Gist options
  • Save gltovar/9b257c98ef8bee352f76d1ac5468266a to your computer and use it in GitHub Desktop.
Save gltovar/9b257c98ef8bee352f76d1ac5468266a 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 ndiSettings = Machine({
id: 'ndiSettings',
initial: 'idle',
context: {
retries: 0
},
states: {
idle: {
on: {
REQUEST_DATA: 'waitForReceiverList'
}
},
waitForReceiverList: {
on: {
RECEIVE_RECEIVE_DATA: 'receiverPicker'
}
},
receiverPicker: {
on: {
REQUEST_DATA: 'waitForVideoSettings'
}
},
waitForVideoSettings: {
on: {
RECEIVE_DATA: 'videoSettingEditor'
}
},
videoSettingEditor: {
on: {
SUBMIT_DATA: 'lockVideoSettingsEditor',
REQUEST_DATA: 'waitForVideoSettings',
}
},
lockVideoSettingsEditor: {
on: {
REQUEST_DATA: 'waitForVideoSettings'
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment