Replies: 1 comment
-
If anyone stumbles across the same issue - I was able to address this by moving away from react-intersection observer and creating my own observer hook which doesn't cause the same issues |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to upgrade to the new gatsby-plugin-image and while investigating the performance impact i noticed that images below the fold were not being lazy loaded.
I am using react-intersection-observer to animate the parent container of the images as it comes in view and it appears that whenever you pass the ref from useInView it is conflicting somehow with the gatsby image plugin. Even when passing the ref to a div that is a sibling of the image.
I've created a basic reproduction here: https://codesandbox.io/s/bold-perlman-mhthy?file=/src/pages/index.js
Any idea how to make use of intersection observer for animation purposes without breaking lazy loading. This wasn't an issue with gatsby-image
Beta Was this translation helpful? Give feedback.
All reactions