Skip to content

fix(usepagination): corrects behaviour of the queryCallback feature #65

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

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

stuarthendren
Copy link
Contributor

previously used useMemo to protect the callback from change but this doesn't work for standard usage as the passed call back will be recreated for each render causing further re-renders. Now uses useRef to stop this loop but still allow the value to be changed.

previously used useMemo to protect the callback from change but this doesn't work for standard usage
as the passed call back will be recreted for each render causein further rerenders. Now uses useRef
to stop this loop but still allw the value to be chnaged.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@stuarthendren stuarthendren merged commit 6b0d4f2 into main Feb 9, 2023
@stuarthendren stuarthendren deleted the sh/pageFix branch February 9, 2023 17:07
@commitd-bot
Copy link
Contributor

🎉 This PR is included in version 0.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants