Skip to content

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.

3 participants