Guards inside onDone #4978
Unanswered
GabrielAPineiro
asked this question in
Q&A
Replies: 1 comment
-
|
Can you please share the code that is causing the problem? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've noticed that when creating a guard inside setup and then using it inside an event on the "on" part of the state, I have access to context, which is nice;
But then, I tried to use the same guard inside an onDone I get an error saying the guard wasn't implemented. And If I try to use an inline guard, I only have access to event and context but is the context defined inside createMachine, which I'm currently using the "context: ({ input }) =>" type of definition. Why is that? Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions