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

fix: stringify array thresholds #404

Merged
merged 2 commits into from
Oct 19, 2020
Merged

Conversation

thebuilder
Copy link
Owner

This fixes ensures Array thresholds are converted to a string when passed to the useCallback dependency array. This prevents infinite rerenders caused by arrays being recreated every render.

@vercel
Copy link

vercel bot commented Oct 19, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/the-builder/react-intersection-observer/mhtu0ojes
✅ Preview: https://react-intersection-observer-git-fix-array-threshold-deps.the-builder.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 19, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e3673a9:

Sandbox Source
useInView Configuration
InView render props Configuration
InView plain children Configuration

@thebuilder thebuilder merged commit e903b1d into master Oct 19, 2020
@thebuilder thebuilder deleted the fix/array-threshold-deps branch October 19, 2020 09:33
@thebuilder
Copy link
Owner Author

🎉 This PR is included in version 8.29.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.

1 participant