Advertisement
Guest User

Untitled

a guest
Apr 6th, 2021
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const example = Machine({
  2.   initial: 'input',
  3.   states: {
  4.     input: {
  5.       on: {
  6.         NEXT: 'example'
  7.       }
  8.     },
  9.     example: {
  10.       initial: 'init',
  11.       states: {
  12.         init: {
  13.           on: { NEXT: 'par' },
  14.         },
  15.         par: {
  16.           type: 'parallel',
  17.           states: {
  18.             first: {
  19.               on: {
  20.                 NEXT: '.success'
  21.               }
  22.             },
  23.             second: {
  24.               on: {
  25.                 NEXT: '.success'
  26.               }
  27.             }
  28.           }
  29.         }
  30.       }
  31.     },
  32.     success: {},
  33.   }
  34. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement