Pass the event into the guard
benjixx opened this issue · comments
Benjamin Schwarze commented
I have a state machine where I want a a transition only to occur when the event has a specific form, e.g. a provided value is in a specific range. My understanding is that guards would be the right approach here, but it looks like events are currently not passed to guards.
Matthew Phillips commented
Hey, thanks for mentioning this. Should have this done soon. I noticed the event is also not passed into the context creator function for submachines. So I'm trying to align all of these functions to have the (ctx, ev) signature.
Matthew Phillips commented
Accidentally closed 😬
Matthew Phillips commented
This was implemented in 0.2.6. Thanks again for bringing it up!