Difference between ActorRefFrom
and ActorLogicFrom
type in V5
#4571
-
While working with v5, I often get confused with ActorRefFrom and ActorLogicFrom types and their use cases. It will be great if we can have a documentation for these and other types that extracts specific type info from the machine config. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Sure, we will add documentation for that. In short: const actorRef = createActor(actorLogic); The E.g. a traffic light actor may have |
Beta Was this translation helpful? Give feedback.
Sure, we will add documentation for that.
In short:
The
ActorRef
is the live actor instance that you can send events to. TheActorLogic
represents the logic of an actor.E.g. a traffic light actor may have
trafficLightMachine
behavior that tells it how to transition between its red, yellow, green states, but there may be many live actor instances (actor refs) of thattrafficLightMachine
behavior.