Best way to access child service (created on later state change) in vue…
Hey So I have a root machine which then invokes a child machine when the state changes. If I have a single component what’s the “right” way to access the child service? Assuming that the component was already created and mounted. The state change which resulted in the child…
Is there a difference between `sendUpdate` and `sendParent`?
... when working with spawned children that are not synchronized with the parent, there are a few ways to send messages from the child to the parent. sendUpdate is new as of v4.7. What is the intended distinction compared to sendParent?
Share: Small piece of code for console.logging transitions
Thought somebody might find this useful - I certainly am :) It can for sure be better but it's doing the job I intended so Im happy. It basically outputs all state transitions to the console, along with the state's current context in a collapsed log group. Also logs when a…
xstate-codegen - gives you 100% type safety in XState
XState is the bomb, but I kept getting scared that I wasn't getting 100% type safety when using it with TS and React. This codegen package gives you full type safety over everything: actions, guards, services etc. https://twitter.com/mpocock1/status/1288782560621928448 Looking…
Is there a way to clear an interval without transitioning to another state?
I realize I basically have a state for the sole purpose of being able to clear an interval. Because the function returned from 'src' will be called only when the state transitions to a new one, I had to create a state which really represents nothing. Is there a better way to…