Issue with Redirecting After Logout Using TanStack Query in React
I’m trying to implement user state management with tanstack query instead of using react context. Right now i can log in and im redirected successfuly to my home page. However when i logout i invalidate the ‘user’ query key but no redirect is happening. It seems the my route rerender before the query key is invalidated.