profile
viewpoint

Ask questions[@xstate/react] rc.4 doesn't run actions when sending events from parent to child

Description xstate/react@v1.0.0-rc.4 causes an issue with sending events from a parent machine to a child machine.

Expected Result Sending an event from the parent machine to the child machine causes the child to transition and fire any actions associated with the transition.

Actual Result The child seems to transition to the new state but doesn't run the actions

Reproduction Steps to reproduce:

  1. Go to sandbox https://codesandbox.io/s/xstate-react-reddit-example-with-actors-x4nk0?file=/src/machine.js
  2. Using rc.4, clicking the button doesn't run the action
  3. Using rc.3 (make sure to refresh sandbox), clicking the button runs the action

Additional context Happens in xstate/react@v1.0.0-rc.4 Works in xstate/react@v1.0.0-rc.3

davidkpiano/xstate

Answer questions cybervaldez

What's the current workaround for this? Currently using: @xstate/react: 1.0.0-rc.6 xstate: 4.12.0

useful!

Related questions

[Feature] Spawning Actors hot 1
source:https://uonfu.com/
Github User Rank List