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

Change introduced in 8.24.1 causing component to re-render infinitely #291

Closed
danoc opened this issue Jan 16, 2020 · 2 comments
Closed

Change introduced in 8.24.1 causing component to re-render infinitely #291

danoc opened this issue Jan 16, 2020 · 2 comments

Comments

@danoc
Copy link

danoc commented Jan 16, 2020

Hi!

We're using this library at Thumbtack in our Image React component and noticed that a change in v8.24.1 was causing our component to infinitely re-render. We're using inViewRef and I suspect that it started to break because of this commit.

I was able to fix the issue in our end by changing the approach we use to combine multiple refs into one. The useCallback suggestion seemed to work: thumbtack/thumbprint#634

It's possible that there's not actually an issue with react-intersection-observer here and that my initial non-useCallback approach of combining refs was incorrect. Either way, I figured it'd be helpful to make an issue here in case other folks run into this.

Thanks for the library!

@thebuilder
Copy link
Owner

Good to know. 👍

@danoc
Copy link
Author

danoc commented Jan 16, 2020

Will close since I imagine there isn't any action item here. 🤝

@danoc danoc closed this as completed Jan 16, 2020
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

No branches or pull requests

2 participants