You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
I am in a situation where I have a getCurrentUser query which is called from a few different protected routes. Based on this I will then redirect the user if they don't have the relevant permissions
This is all great. However, I also need to call getCurrentUser from other components within the children. If for some reason the currentUser object is updated and this protected route redirects you the browser throws a warning:
Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
I assume this is because the currentUser changes propagate through the app and apollo doesn't know it have unmounted.
I am in a situation where I have a getCurrentUser query which is called from a few different protected routes. Based on this I will then redirect the user if they don't have the relevant permissions
This is all great. However, I also need to call
getCurrentUser
from other components within the children. If for some reason the currentUser object is updated and this protected route redirects you the browser throws a warning:I assume this is because the currentUser changes propagate through the app and apollo doesn't know it have unmounted.
"@apollo/client": "3.0.0-rc.6",
"@apollo/link-error": "^2.0.0-beta.3",
The text was updated successfully, but these errors were encountered: