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
I'm using the react-router loader with RTK queries. When I perform a mutation that requires invalidation, I need to re-run the loader using useRevalidator from react-router.
The problem is that the loader runs while the invalidatesTags process is still ongoing. I've tried dispatching getRunningQueriesThunk to wait for pending queries to finish, but it returns an empty array even though there are pending queries in the state.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Guys,
I'm using the react-router loader with RTK queries. When I perform a mutation that requires invalidation, I need to re-run the loader using useRevalidator from react-router.
The problem is that the loader runs while the invalidatesTags process is still ongoing. I've tried dispatching
getRunningQueriesThunk
to wait for pending queries to finish, but it returns an empty array even though there are pending queries in the state.Beta Was this translation helpful? Give feedback.
All reactions