SHARE
TWEET

Untitled

a guest Oct 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Available variables:
  2.   // - Machine
  3.   // - interpret
  4.   // - assign
  5.   // - send
  6.   // - sendParent
  7.   // - spawn
  8.   // - raise
  9.   // - actions
  10.   // - XState (all XState exports)
  11.  
  12.   const elevatorMachine = Machine({
  13.     key: "door",
  14.     initial: "closed",
  15.     states: {
  16.       closed: {
  17.         on: {
  18.           OPEN: "open",
  19.           LOCK: "locked"
  20.         }
  21.       },
  22.       open: {
  23.         on: {
  24.           CLOSE: "closed"
  25.         }
  26.       },
  27.       locked: {
  28.         on: {
  29.           UNLOCK: "closed"  
  30.         }
  31.       }
  32.     }
  33.   });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top