Root event/transition outside of states
object
#1826
Unanswered
mahmoudfelfel
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Your understanding is correct - transitions always are defined in states. However, XState currently always have an implicit “root” state and that’s why this works. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I was checking some XState examples on codesandbox and have a question regarding this type of machine, I'm a bit confused about the
SEARCH_CHANGED
event, it is outside thestates
object, I can see the need for it, but does that type of catch-all events has a name in state machines? my initial understanding was that each event/transition has to be inside a state as it is the thing that moves the machine from one state to another.I tried to find something similar in the documentation guides but couldn't, is it mentioned somewhere and I missed it?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions