Skip to content

Repeated Images loaded on render #68

@sohamsshah

Description

@sohamsshah

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions