aroundRadius typing can generate infinite render #6391
Labels
Library: React InstantSearch ≥ 7
Issues in any of the react-instantsearch@7 packages (formerly named react-instantsearch-hooks)
Type: Bug
🐛 Current behavior
Hey there,
First, I can't wait to see the day my coworkers and I will finally remove Algolia from our codebase. We need 8 different npm packages to run our search and the documentation is a nightmare to follow because of this.
I definitely regret to have committed to using Algolia to build our search instead of relying on our basic Postgres + Remix backend.
That being said, we discovered an issue yesterday causing infinite re-render within our search page. This happened after a typescript bump (to 5.6.2) that forced us to bump a bunch of Algolia libs.
I suspect this PR to be related to our issue. (we had to bump
react-instantsearch
from7.5.2
to7.13.2
)I found a fix that might not be the best but works for our use case, it's commented out on the sandbox.
Have a nice day.
🔍 Steps to reproduce
Open the codesandbox and add this query param to the URL
?radius=5000
. You should see infinite re-render of the<Content>
component logged in the consoleLive reproduction
https://codesandbox.io/p/sandbox/epic-darwin-62sfmx
💭 Expected behavior
No infinite re-render
Package version
react-instantsearch 7.13.2
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: