Loadable Component, lazy loading based on scroll? #32500
Unanswered
dungle-scrubs
asked this question in
Help
Replies: 1 comment
-
Hi! In Gatsby's case, loadable-components is primarily used for code-splitting + SSR until Suspense + Gatsby is fully stable. For lazy loading as you describe, try react-lazyload. Here is a more in-depth blog post describing the best use cases for gatsby-plugin-loadable-components-ssr. |
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've installed Loadable Component and
gatsby-plugin-loadable-components-ssr
and while definitely helpful, I'm a little confused by how it's best meant to be used.I've read in many places that it lazy loads components that are below the fold. In my mind, lazy loading refers to loadings something when it's needed (e.g. based on scroll or some other trigger with intent behind it). However all components that I'm loading are still being loaded from the get-go, just deferred and in smaller pieces.
Is there a way to load components (aka request the resources) based on scroll position?
Beta Was this translation helpful? Give feedback.
All reactions