#Intersection Observer on Server Side

5 messages · Page 1 of 1 (latest)

errant warren
#

Is it possible to set up the intersection observer on the server side. Right now I'm doing it in a useVisibleTask for which I'm getting the warning that it runs eagerly and blocks the main thread

halcyon yacht
#

there is no intersection observer api on the server side, so no, it is not possible

errant warren
#

If im not mistaken, under the hood, useVisibleTask uses intersection observers to achieve its execute on display behaviour, so there should be some way to do it right? Or have I misunderstood how it works

halcyon yacht
#

the intersection observer is initialized on the client-side only, there is no server side API

#

the useVisibleTask$ adds a hook with the qwik runtime that is client-side