flowforfrank / webtips

https://webtips.dev
1 stars 0 forks source link

webtips/react-hooks/element-in-viewport #14

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

How to Check if An Element is in the Viewport with React Hooks - Webtips

You commonly come across requests such as lazy loading, triggering animations or sending tracking when elements enters the screen. React hooks for the save.

https://www.webtips.dev/webtips/react-hooks/element-in-viewport

robhicks commented 2 years ago

Your useIntersection hook doesn't work. It throws errors because element is not an element but a reference.