Skip to content

Is rootMargin working? #330

@kuworking

Description

@kuworking

In the recipe for lazy loading images here https://github.com/thebuilder/react-intersection-observer/blob/master/docs/Recipes.md#lazy-image-load I haven't been able to observe any effect related to rootMargin

This is, images were loading always when barely seen, not before or after

How is this supposed to work?

*In the link example in https://codesandbox.io/embed/lazy-image-load-mjsgc one has to "false"fy the native image loading browser capabilities to test this - in both files (and remove the loading prop)

 const supportsLazyLoading = false;

And the margin has also to be corrected to rootMargin (I assume)

EDIT: I can see that it is working in other examples where I am triggering animations, but with the one of images It seems to be ignored (?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions