jaredpalmer / jaredpalmer/react-simple-infinite-scroll
Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 141
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
Following the 'full example' I get this error once I scroll while the component where react-simple-infinite-scroll lies has been unmount.
I assume the error has to do with not removing the event listener to scroll - which should be done once the component containing the infinite scroll is unmounted. This seems to be coupled with how the sentinel object is handled, which is mentioned in the DOCS. It is unclear how it should be used, however.
This, to me, seems like a DOC issue if anything. I think this issue has been accounted for. It is just not properly communicated in the DOCS.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the full example and the sentinel documentation mentioned in the issue, then reproduce the error by scrolling after the component unmounts. Clarify the sentinel's intended use and document the expected behavior after unmounting, with the issue resolved when newcomers can follow the example without the reported TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100