-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onError loop #5241
Comments
This could be related to my issue: apollographql/react-apollo#3407 I found that the problem only happens if |
I created a PR which I believe will fix this issue: apollographql/react-apollo#3419 |
I use Functional Component. In my case it help only if I move onError function outside of component. Memorized functiond didn't help. |
Intended outcome:
I'm trying to set data from query to state. For It I'm using useQuery hook and useEffect. Also i need to do some action in case of error for it I'm using onError callback.
Actual outcome:
If I add callback then component is starting to loop. If I comment(or delete) this onError then it doesn't loop.
How to reproduce the issue:
I tried to reproduce this bug, but it freezes codesandbox, so I made the screenshot.
Versions
The text was updated successfully, but these errors were encountered: