Allow spawn(<machine>)
to accept an optional starting state
#3946
-
WhatIt'd be handy to set the initial state when calling spawn(myMachine, <SpawnOptions>, { state: <desired initial state> }) Problem I'm Trying to SolveI'm building out a small game in which there is a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Where that "desired initial state" is coming from? How do you get to know it within your app? |
Beta Was this translation helpful? Give feedback.
The
ctx.isPlaying
was just an example of smth that u could base your decision on. Yourinit
proposal~ is pretty much implemented in v5 asinput
(we dont - yet - have dynamic~ initial states there though but there is a plan to introduce them)