Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Over-fetching hook #215

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Over-fetching hook #215

merged 1 commit into from
Dec 13, 2024

Conversation

grod220
Copy link
Contributor

@grod220 grod220 commented Dec 13, 2024

The useRefetchOnNewBlock() is overfetching as there isn't a cache for the many re-render calls happening.

Before/after fix:

Screen.Recording.2024-12-13.at.7.30.08.AM.mov

@grod220 grod220 requested a review from a team December 13, 2024 06:35
@grod220 grod220 self-assigned this Dec 13, 2024
Copy link
Contributor

@TalDerei TalDerei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really great improvement!

so basically refetch is only called once per block height for a given query key

@grod220 grod220 merged commit 843a6bb into main Dec 13, 2024
3 checks passed
@grod220 grod220 deleted the over-fetching branch December 13, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants