Last active
          February 20, 2020 04:09 
        
      - 
      
- 
        Save joshpitzalis/e51de4a18bd4d19a84ecb3f15bba5ef2 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 fetchMachine = Machine({ | |
| id: 'contactChunks', | |
| initial: 'idle', | |
| states: { | |
| idle: { | |
| on: { | |
| FETCHED: 'loading', | |
| ALREADY_FETCHED:'selector', | |
| } | |
| }, | |
| loading: { | |
| on: { | |
| RESOLVED: 'selector', | |
| REJECTED: 'error' | |
| } | |
| }, | |
| selector: { | |
| onEntry: ['deduplicate', 'preSelect'], | |
| on: { | |
| SELECTED: 'selector', | |
| CANCELLED: 'idle', | |
| REVEALED_MORE:'selector', | |
| } | |
| }, | |
| error: { | |
| on: { | |
| RETRIED: 'loading' | |
| } | |
| } | |
| } | |
| }); | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment