Trying to update the context of a parent machine from an actor's context
CODESANDBOX REFERENCE: https://codesandbox.io/s/recipemachine-bikxx Hey everyone, I have two machines - one parent and one child - that I'm trying to get to communicate with one another. Specifically, I'd like for the child machine to periodically send an update/event to it's…
Sending data from parent machine to child invoked callback
I'm basing my code on this section: https://xstate.js.org/docs/guides/communication.html#listening-to-parent-events However, when sending the events PING and PONG, is there any way I can send some other data along? If not, what's the best way to send data from parent machine to…
Stored/serialized then reloaded states lose their actions' implementation?
If I save a serialized state and then try to restart a machine with this state - following the documentation, I do a state = State.create(reloadedState); and then resolvedState = myMachine.resolveState(state); and then …
@davidkpiano's article on Redux @ dev.to
@davidkpiano -- Just read your article on dev.to, great article! The following is a great example of realizing you need a state machine, trying to solve it via brute force, and abandoning it for XState. Hopefully, it will give you a chuckle... It hit home for me because I had…
Handling communication between components
Hey folks! I am super new to state machines and I am investigating using them with React, via XState. One thing I am trying to wrap my head around is having multiple components communicate with a single machine instance, based on what I have read…
What are some approaches to decouple xstate's state from component state?
I got to thinking about this over the weekend. We're starting to use XState much more heavily at work, and being able to refactor machines aggressively without having to touch components sounds nice. Off the top of my head, the only one I can think of is: • Build the equivalent…
Example of two actors interacting
Does anyone have a sample repo to refer to for more complex ui interactions. For example multiple different types of filters trying to filter a table. Filter machine being one actor and table machine being another being spawned by a single parent.