Skip to content
Discussion options

You must be logged in to vote

Unfortunately, this means that the hook triggers a rerender with 1 page of data, and then 2 pages of data.

I am not positive that this is what is happening / should be happening. When you have two pages in the cache, and you invalidate, what you should be seeing on screen is:

- old page 1 / old page 2
- invalidate
- new page 1 / old page 2
- new page 1 / new page 2

because react query doesn't remove any data from the cache, it just replaces the stale data with new data. So I'm not sure how content height would be affected by the refetches - unless of course different items are fetched that render differently.

Can you provide a codesandbox reproduction?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bywo
Comment options

@bywo
Comment options

@TkDodo
Comment options

Answer selected by bywo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants