You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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!
The text was updated successfully, but these errors were encountered:
Hi!
We're using this library at Thumbtack in our
Image
React component and noticed that a change inv8.24.1
was causing our component to infinitely re-render. We're usinginViewRef
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#634It'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!
The text was updated successfully, but these errors were encountered: