Often pieces of state will be needed for decisions in the effect methods. Would you recommend keeping these instead in an external useState, or is there some way to pass these in via events (without changing state).
for instance, in xstate you can do something like this:
{
states: {
start: {
on: {
readCountChange: {
actions: [assign((context, event)=>{ return { readsExist: event.readCount > 0}})]
}
}
...
}
}
And then use that readsExist later in a condition to decide if some other event should be allowed to make a state change.