Closed vpaul18 closed 1 year ago
I have the same issue, if you give an api call through postman it actually works
Does this happen with other versions as well?
@Haroenv This sandbox seems to work : https://codesandbox.io/embed/kvn0lpp83?codemirror=1 , but If I match their dependencies and imports , I get export errors from the packages.
@VishnuuVijayan Yes, it does seem to workβ¦ when the page rerenders (for example if I change a CSS class) - I can see the hits β¦
Hey @vpaul18, the issue comes from React strict mode usage. It disappears in React InstantSearch 6.37.0, where we added React 18 strict mode support.
I updated to 6.38.0 and did a couple changes on your sandbox and it seems to work just fine now.
Note that we're passing currentRefinement
as the input's value
, making it controlled. The updated value comes from React InstantSearch, which updates it when using refine
.
If you want to stay on 6.34.0, you need to drop strict mode (see here).
π Bug description
I have been struggling for hours now as to why the hits array passed as props is empty.
π Bug reproduction
Here is a full reproduction of the problem I'm facing:
https://codesandbox.io/s/cocky-snowflake-gni9uf?file=/src/App.js
π Expected behavior
I expect the results of the search (each hit) to show up after a keystroke. I am also using the same datasets provided by you, so I'm confident that the data exists.
Environment
Additional context
That would be it! Thanks!