Skip to content

isSearchStalled causes an infinite loop with slow connections #374

Open
@mdubus

Description

@mdubus

Using the isSearchStalled props received from connectStateResults with a slow internet connection causes the page to re-render endlessly 🥲

Capture d’écran 2021-04-20 à 14 33 33

You can try it by adding the following code to the playground :

const Results = connectStateResults(({  isSearchStalled }) => {
  if (isSearchStalled) return <div>loading...</div>

  return <InfiniteHits hitComponent={Hit} />
})

Replace then the InfiniteHits component with the Results one. Don't forget to test with fast 3G or slower !

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions