Created
          July 12, 2023 05:19 
        
      - 
      
- 
        Save hlkn/2238a6daf4ec509afc3f64050cb5aae2 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 waterMachine = Machine({ | |
| id: 'water', | |
| initial: 'liquid', | |
| states: { | |
| ice: { | |
| on : { | |
| HEAT: { | |
| target: "liquid" | |
| } | |
| } | |
| }, | |
| liquid: { | |
| on: { | |
| HEAT: { | |
| target: "gas" | |
| }, | |
| FREEZE: { | |
| target: "ice" | |
| } | |
| } | |
| }, | |
| gas: { | |
| on: { | |
| HEAT: { | |
| target: "plasma" | |
| }, | |
| FREEZE: { | |
| target: "liquid" | |
| } | |
| } | |
| }, | |
| plasma: { | |
| on: { | |
| FREEZE: { | |
| target: "gas" | |
| } | |
| } | |
| } | |
| } | |
| }); | |
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment