Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated Images loaded on render #68

Open
sohamsshah opened this issue Aug 18, 2021 · 0 comments
Open

Repeated Images loaded on render #68

sohamsshah opened this issue Aug 18, 2021 · 0 comments

Comments

@sohamsshah
Copy link
Owner

How to reproduce:

On Home page (without any search)

  • Total Images loaded are 20. While default images that should be loaded without scrolling must be 10.
  • This is because the useEffect is run on mount, which is meant to be run only when query changes.

On Searching for a query

  • Total Images loaded are 20. Out of which last ten are repetition of first 10.
  • This happens because for a small time gap, the dataLength === 0 and thus the intersection is observed which triggers the effect which runs on every change in IsBottomVisible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant