Created
          July 29, 2021 10:48 
        
      - 
      
- 
        Save farskid/d9e9145d09f037ce8c284c3593665215 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
    
  
  
    
  | const fileMachine = Machine({ | |
| id: "file", | |
| type: "parallel", | |
| states: { | |
| upload: { | |
| initial: "idle", | |
| states: { | |
| idle: { | |
| on: { | |
| INIT_UPLOAD: { target: "pending" }, | |
| }, | |
| }, | |
| pending: { | |
| on: { | |
| UPLOAD_COMPLETE: { target: "success" }, | |
| }, | |
| }, | |
| success: {}, | |
| }, | |
| }, | |
| download: { | |
| initial: "idle", | |
| states: { | |
| idle: { | |
| on: { | |
| INIT_DOWNLOAD: { target: "pending" }, | |
| }, | |
| }, | |
| pending: { | |
| on: { | |
| DOWNLOAD_COMPLETE: { target: "success" }, | |
| }, | |
| }, | |
| success: {}, | |
| }, | |
| }, | |
| }, | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment