T
TanStack2y ago
harsh-harlequin

Why is my page not refreshing?

I must have a failure in understanding something. Some things refresh, some don't and I can't understand why. I have a page that consists of "main" data and some sub components. Main data is "work" and there are "editions" on page as well as a log of changes. Work and edition data can be changed, log should be updated automatically after this. When I edit work data, that changes automatically, but log only if I refresh the page (by switching windows for instance). If I edit edition, it also requires a refresh, not even edition's data is changed automatically. Edition info is loaded with the same query as work while logs are loaded with their own useQuery() call but they have the same queryKey.. Both dialog's have exactly the same queryClient.invalidateQueries() call in their hide function. Looking at the states they stay stale in the problematic cases so it's not just an update issue in React. I have similar issues with some other pages as well so clearly there's something I'm not understanding.
1 Reply
rival-black
rival-black2y ago
Do a reproduction please

Did you find this page helpful?