Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  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. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement