Can we patch our own onSuccess and onError callbacks for a query?? #7483
Answered
by
TkDodo
ashishsurya
asked this question in
Q&A
-
|
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
May 27, 2024
Replies: 1 comment 4 replies
-
sure, but if you function closes over something from your component / custom hook, like a prop or state, and you use this in multiple components, it's not guaranteed which thing will be "seen". If you have a pure function it will work. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
ashishsurya
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sure, but if you function closes over something from your component / custom hook, like a prop or state, and you use this in multiple components, it's not guaranteed which thing will be "seen". If you have a pure function it will work.