is there a better way to nest machines in react? #5238
Unanswered
alita-moore
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Also I recall someone mentioning at one point that you shouldn't nest machines, why not? I've found that nested machines can achieve very powerful use-cases. In fact, trying to reduce the depth of the machine hierarchy makes my app less flexible and more confusing. But maybe I'm naive? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use a machine as an actor in another machine in react. I am accomplishing this by passing back the
.logic
from the actorRef. But this feels weird, is there a better way to do this?Specifically, here's my code:
the logic is then provided to another machine in the
.provide(
method.I haven't done a lot of investigation but I feel like this is hacky, am I doing something I shouldn't be?
Beta Was this translation helpful? Give feedback.
All reactions