davidnguyen11 / react-is-in-viewport

πŸš€πŸ“±The component allows to detect whether or not the component is in the viewport πŸš€πŸ“±
MIT License
15 stars 2 forks source link

TypeError: Cannot read property 'getBoundingClientRect' of null #37

Closed ivanafanasyeu closed 9 months ago

ivanafanasyeu commented 4 years ago

Next.js + typescript

After cmd+shift+R issue is gone

itsdarrylnorris commented 3 years ago

This happens all the time when I change routes in my single-page application.

Here is the console error:

Uncaught TypeError: Cannot read properties of null (reading 'getBoundingClientRect')
    at Viewport._this.handleScroll (index.js?f5fe:83)
    at exec (throttle.js?fef0:67)
    at wrapper (throttle.js?fef0:93)

Here is where the actual error happens: Screen Shot 2021-10-14 at 3 57 43 PM

ivanafanasyeu commented 9 months ago

close due to inactivity