Description
When using strict mode wildcard transitions don't work
Expected Result
Wildcard transitions work
Actual Result
Error message like Error: Machine 'main' does not accept event 'no'
Reproduction
https://codesandbox.io/s/new-smoke-sjwzt
Additional context
xstate version 4.7.0-rc7
@davidkpiano I'm curious what's the reason behind strict mode? I understand why it handled failed promises in a different way (although I believe that strict behavior in this regard should become the default and the only one in the future), but I don't quite understand why it also disallows "unaccepted" events. Isn't this exactly the true beauty of statecharts that we can send events to a machine and if it happens to be in a state which doesn't accept a particular event it then is ignored (like in the default setting)? If one truly wants to have this "strict" behavior wouldn't it be better to just recommend wrapping .send with a guarding code in user land?
@Andarist Interestingly enough, devs can create their own strict mode with a wildcard transition on the root state that can throw an error if an event is not handled in any other state.
I'll mark this as "invalid" since it doesn't make sense to use wildcard transitions and strict mode together.
@davidkpiano I see just now that it was even mentioned in the docs that on unknown events an error will be thrown