I am not getting any state from onTransition #1686
Unanswered
theprantadutta
asked this question in
Q&A
Replies: 1 comment 12 replies
-
Are you sending events to the auth service? It won't change state unless you do, according to the machine definition. |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So here's my machine.
Now I am able to toggle the states and context and everything. But the authService is not console-logging the state value like it should every time the state changes. It only runs once.
I am console-logging these state values in another component like Navbar and it works fine there. But I need to detect the state change to persist the state. So how do I do that inside this service? To be precise, how do I make my service run everytime there is a change in states.
I am using nextjs. So is it a problem with react or am I doing something wrong? Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions