jaredpalmer / jaredpalmer/react-simple-infinite-scroll

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null

Open
#6 7 comments 1 reaction 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.