Closed abusada closed 1 year ago
There's indeed an issue with strict mode in server side rendering we haven't yet been able to pinpoint (the destroy method is called in the wrong order, and all state is reset, including refinements).
For now disabling strict mode in server side rendering is a workaround
Could you possibly point me to the code where you suspect the issue is happening? perhaps i could be of help!
There's some tests:
Also there's a more complex part where widgets get added more than once in hydration, but that might not be the cause of the issue
This issue may be addressed in v6.30.2. Could you please upgrade and let us know how it goes?
@kanehara Did the fix mentioned by @francoischalifour fixed your issue?
We're doing a round of cleanup before migrating this repository to the new InstantSearch monorepo. This issue seems not to have generated much activity lately, so we're going to close it, feel free to reopen if needed.
š Bug description
I'm following this guide trying to achieve server side rendering with nextjs and react-instantsearch-hooks.
once i wrap my code with![screenshot- 2022-06-23 at 15 57 31](https://user-images.githubusercontent.com/2572320/175317280-8d5260bc-4011-41ab-be58-e5e7e6c296d0.gif)
InstantSearchSSRProvider
, search functionality simple stops working,Live reproduction:
https://codesandbox.io/s/hungry-stitch-b070o2?file=/pages/index.tsx:990-1014
š Bug reproduction
Steps to reproduce the behavior:
š Expected behavior
Expect search to work and hits to update, notice how in the withour-ssr page the search functionality is working properly.
Environment
please note the following configs in
next.config.js
:update setting
reactStrictMode
to false fixes the issue, here is a fork of the above sandbox with strict mode turned off: https://codesandbox.io/s/lucid-cache-n7h0no?file=/next.config.js:19-45