React Native error : You can’t switch instantsearch from being uncontrolled to controlled

Hello,

I need to use several <InstantSearch /> in order to separate <SearchBox /> widget.

Of course these <InstantSearch /> are all linked to the same searchState and it is perfectly updated.

But I have an error when I write just one letter in the search bar of <SearchBox /> component.

React Native error : You can’t switch instantsearch from being uncontrolled to controlled

Is it necessary to keep the call of <SearchBox /> component in the main <InstantSearch /> (I mean the first one) ?? Because this is also my problem I can’t. I would really like to put <SearchBox /> completely outside the main <InstantSearch /> (because of the visual presentation I am gonna make of it)

Would you help me ?

Thomas

Hi there,

Looks like you have an issue with the management of the state of react-InstantSearch. Once you’ve started to manipulating it there is no going back. Do you set any value for searchState on the InstantSearch component? This issue might help you.

Also best would be if you can provide us with the current state of your implementation using this template. We do not have a template for react-native yet…

Maybe you could show us some code?

Thanks, I found a solution, the case is closed (I just use another module from now on easier solution)