#Unable to send events to spawned child machine

1 messages · Page 1 of 1 (latest)

celest adder
raven sierra
#

This is strange but a workaround is to do this:

  const { playlistService } = usePlaylistContext();
  const ref = useSelector(playlistService, (state) => state.context.ref);
  const [state, send] = useActor(ref!);

  useEffect(() => {
    send("LOADED");
  }, [send]);
#

See the use of useSelector instead?

celest adder
#

Hey David, just tried this approach but seems to be the same

raven sierra