Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 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 callMachine = Machine({
  13. id: 'call',
  14. type: 'parallel',
  15. states: {
  16. router: {
  17. initial: 'idle',
  18. states: {
  19. idle: {},
  20. preparing: {},
  21. waiting: {
  22. CANCEL: {
  23. target: 'idle',
  24. },
  25. },
  26. }
  27. },
  28. stream: {
  29. id: 'stream',
  30. initial: 'idle',
  31. states: {
  32. idle: {
  33. on: {
  34. START: 'streaming',
  35. }
  36. },
  37. streaming: {
  38. on: {
  39. STOP: 'idle',
  40. }
  41. }
  42. }
  43. }
  44. }
  45. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement