Last active
August 15, 2020 13:08
-
-
Save joystick/e5756eb9c0448b003cee5e5d231a8ecf to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fileListMachine = Machine({ | |
id: 'fileList', | |
initial: 'displaying', | |
context: { | |
files: [] | |
}, | |
states: { | |
displaying: { | |
on: { | |
ADD_FILE: 'adding' | |
} | |
}, | |
adding: { | |
on: { | |
ADD_FILE_OK: 'displaying' | |
} | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment