How to emit events from actor logic such as fromObservable #4968
-
Hi, I have a question regarding emitting from actorLogic which is invoked such as Example:
Please let me know if I am doing something wrong here or my expectations are not right. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
After playing around with XState I have found better suitable patterns. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I see Event observables working, but I don't see I'm doing an API call with Angular rxjs but the result is not propagated to PD. I had a target inside |
Beta Was this translation helpful? Give feedback.
Hi @GabrielAPineiro,
See this part in the docs https://stately.ai/docs/invoke#invoking-event-observables. Just return events from your observables and the rest is handled by the machine. From there you can do whatever you need, sendTo or whatever else.