Closed ShMcK closed 6 years ago
I'm not sure what you mean by dispatch
. The consumer components have access to a transition
callback, which sends an event to the xstate
machine just as Redux dispatch
sends an action to Redux reducers.
It's probably a good idea to pass the underlying XStateful
instance's setExtState
to consumer components too, which would allow them to update extstate
as you suggest. I'll do this in the next day or so I hope.
Added setExtState
to consumer components, released in v0.6.0.
If extstate is to store data much like Redux, should there be a way that this data can be updated without a statechart transition? Would it be a good idea to also pass
dispatch
into the Machine render method?