Skip to content

Capability to clear the time interval after component viewable in the viewport#1

Description

@anthlasserre

Hey @thinhkhang97 馃憢馃徏
Thanks a lot for this library, this is really helpful.

I have reversed-engineered this library and found an infinite interval running even after getting the success callback.
I was wondering if we could implement a prop like runOnce?: boolean in the ViewPortDetector component.

In that way. Once we have an onChange call with true as a new value, we won't call the onChange callback again and we're gonna clear the setInterval.

What are your thoughts?

I'm about to raise a PR with this suggestion

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