Created
December 30, 2019 15:59
-
-
Save fidoogle/3ea38290f9919a65d694ff59265a46c6 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 allData = new Array(25).fill(0).map((_val, i) => i + 1); | |
| const perPage = 10; | |
| const dataMachine = new Machine({ | |
| id: 'dataMachine', | |
| initial: 'loading', | |
| states: { | |
| loading: { | |
| on: { | |
| DONE_MORE: 'more', | |
| DONE_COMPLETE: 'complete', | |
| FAIl: 'failure' | |
| } | |
| }, | |
| more: {}, | |
| complete: { | |
| type: 'final' | |
| }, | |
| failure:{ | |
| type: 'final' | |
| } | |
| } | |
| }) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment