antonioru / beautiful-react-hooks

🔥 A collection of beautiful and (hopefully) useful React hooks to speed-up your components and hooks development 🔥

Home Page:https://antonioru.github.io/beautiful-react-hooks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useViewPort hook after contents seen

kroscek opened this issue · comments

When the contents doesn't appear in the corresponding viewport anymore or once the contents have been seen by the user, the hook need to disconnect, otherwise, it will perform redundant rendering via state update on intersectionObserver. There should be an option to allow whether to allow this behavior or not flexibly.