-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Statemapping not working with instantsearch.js 4.61.0 #5954
Comments
Which version did you have previously? the only change between 0.1.4 and 0.1.5 is marking it compatible with next 14. Do you have a reproducible example of this issue? |
It seems to be giving me this error:
Referencing this component:
with these routing settings
Changing routing to True makes everything work fine again but with long and complex Url parameters. What could be causing this issue and is there a fix I can try? I've already tried adding a static attribute and removing any props but that didn't solve it. |
This error happens because of: instantsearch/packages/instantsearch.js/src/connectors/refinement-list/connectRefinementList.ts Lines 569 to 575 in 77919a9
This code was introduced (#5912) in the latest version of InstantSearch.js, so if you revert to the previous (4.60.0 instead of 4.61.0) it should at least not error. It seems like you're not always returning arrays from the values of I wonder if it's related to the key existing but having value undefined? if you'd clarify what situation you have I could help more. I don't see what the wrong value would be based just on looking at the code, but maybe could find it if you make a reproducible example. |
It looks like "react-instantsearch" version 7.4.0 is causing these errors. Everything is working fine now with this setup: I've added a console.log() to get the uiState before stateMapping. RouteToState logged a value according to the parameters in the URL but stateToRoute didn't log anything with "react-instantsearch" version 7.4.0. |
🐛 Current behavior
I get an error saying that statemapping.stateToRoute is not a function when loading a page with react-instantsearch-nextjs. This didn't happen with the version I had previously to updating.
How can I fix this?
🔍 Steps to reproduce
Add statemapping code above to an instance of react-instantsearch-nextjs.
Live reproduction
codesandbox.io
💭 Expected behavior
Statemapping to work as in previous versions where I can create a custom url from the current uiState.
Package version
react-instantsearch-nextjs 0.1.5
Operating system
No response
Browser
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: