Skip to content

Commit 977fb87

Browse files
committed
move actor logic creator listing
1 parent 7d23ad4 commit 977fb87

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

docs/actors.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,7 @@ In the actor model, actors are objects that can communicate with each other. The
3535

3636
## Actor logic
3737

38-
Actor logic is the actor’s logical “model” (brain, blueprint, DNA, etc.) It describes how the actor should change behavior when receiving an event. You can create actor logic using **[actor logic creators](#actor-logic-creators)**. The types of actor logic you can create from XState are:
39-
40-
- [State machine logic (`createMachine(...)`)](#createmachine)
41-
- [Promise logic (`fromPromise(...)`)](#frompromise)
42-
- [Transition function logic (`fromTransition(...)`)](#fromtransition)
43-
- [Observable logic (`fromObservable(...)`)](#fromobservable)
44-
- [Event observable logic (`fromEventObservable(...)`)](#fromeventobservable)
45-
- [Callback logic (`fromCallback(...)`)](#fromcallback)
38+
Actor logic is the actor’s logical “model” (brain, blueprint, DNA, etc.) It describes how the actor should change behavior when receiving an event. You can create actor logic using **[actor logic creators](#actor-logic-creators)**.
4639

4740
In XState, actor logic is defined by an object containing methods like `.transition(...)`, `.getInitialState()`, `.getSnapshot()`, and more. This object tells an interpreter how to update an actor’s internal state when it receives an event and which effects to execute (if any).
4841

@@ -213,6 +206,15 @@ console.log(snapshot.output);
213206

214207
## Actor Logic Creators
215208

209+
The types of actor logic you can create from XState are:
210+
211+
- [State machine logic (`createMachine(...)`)](#createmachine)
212+
- [Promise logic (`fromPromise(...)`)](#frompromise)
213+
- [Transition function logic (`fromTransition(...)`)](#fromtransition)
214+
- [Observable logic (`fromObservable(...)`)](#fromobservable)
215+
- [Event observable logic (`fromEventObservable(...)`)](#fromeventobservable)
216+
- [Callback logic (`fromCallback(...)`)](#fromcallback)
217+
216218
### `createMachine` for State Machine Logic {#createmachine}
217219

218220
You can describe actor logic as a [state machine](machines.mdx). Actors created from state machine actor logic can:

0 commit comments

Comments
 (0)