algolia / instantsearch

⚑️ Libraries for building performant and instant search experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.

Home Page:https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configure setting doesn't get passed down on first render

cesarvarela opened this issue Β· comments

πŸ› Current behavior

Trying to use the new Hooks behavior, It seems that UIState fields under the configure key don't get passed down from the initial state when using a custom router.

πŸ” Steps to reproduce

Open the code sandbox and look at the console, the first render is missing the configure key although the other properties are there.

Live reproduction

https://codesandbox.io/s/inspiring-water-c5mcv4?file=/src/ConfigureTest.tsx

πŸ’­ Expected behavior

I think configure props should be passed down as the others.

Package version

7.2.0

Operating system

No response

Browser

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

After a while, I found this: https://github.com/algolia/instantsearch/blob/master/packages/instantsearch.js/src/lib/stateMappings/simple.ts#L23

It is not very intuitive to associate "simple" with "state as it is except configure object."

closing in favor of #5916