Skip to content

inView stays true when component is unmounted #303

@chapa

Description

@chapa

Hello,

When the component holding the ref is unmounted while it was visible, the inView stays true.

Here's a fork of your basic example using useInView : https://codesandbox.io/s/react-intersection-observer-2rdzd
Click on the button to unmount the <Wrapper> component which holds the ref, the status at the top-right corner stays green

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