Skip to content

Reuse the same IntersectionObserver for all components #25

@Aljullu

Description

@Aljullu

With the change in this commit 364ce21 we stopped using window to store the IntersectionObserver and instead we store it in the component's class. That means every lazy-load image or component creates an IntersectionObserver.

It would be more efficient to use the previous approach but that was relying on the window object, which is not available in SSR.

We should use the global object available in SSR and CSR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions