Replies: 4 comments
-
Have you considered using the Intersection Observer API? The API is designed for use cases like yours. |
Beta Was this translation helpful? Give feedback.
-
i even use it) but i need to disoplay html with styles but js code load on intersection |
Beta Was this translation helpful? Give feedback.
-
Hmm.. sounds like an XY problem. Why do you want to |
Beta Was this translation helpful? Give feedback.
-
This phenomenon is called partial hydration where the whole HTML is sent with the network request but javascript for pieces below the fold are postponed. We'll look into this in the near future but we haven't started the exploration phase yet. |
Beta Was this translation helpful? Give feedback.
-
I have a very complicated form on the very bottom on each page of my site and i want to load all js code related to this form only when user scrolled to it, before that just display ssr HTML, how i do it in gatsby?
Beta Was this translation helpful? Give feedback.
All reactions