Replies: 2 comments 6 replies
-
Hi 👋 Active queries (if the query is currently being rendered via useQuery or related hooks) should be refetched if invalidated via invalidateQueries and inactive queries should be marked as stale. It's difficult to reason about this without seeing your implementation - please could you try to reproduce this so I can take a look for you? |
Beta Was this translation helpful? Give feedback.
-
@louis-young useMemo is not hurting rerendering...
Rerendering if I put something like this
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
RQ does not force React to rerender, after succesful endpoint call, on
onSuccess
triggeringinvalidateQueries
for query that have stale time.I get stale data all the time, I need to manually refresh the page.
I dispatch action for
snackbar
that goes up to the page of the app, and I have thereuseQuery
, and dont like refreshing the data.Starts to worry me a bit, how to have stable updates and queries, refetching of queries or optimistic updates.
Everything is hard and fragile to be setup properly for something simple.
I don't have code to reproduce, but this simple scenario, mutationDispatch, onSuccess invalidate query and wait some miracle with refetching fresh data, but never happens. :/ Does not all work, if I manually setQueryData without refetch.
BR.
Beta Was this translation helpful? Give feedback.
All reactions