Pass in search query without SearchBox

Hi everyone

I have a question. I have a SearchBar as a Header in React Native, as such, I cannot place it inside the InstantSearch component. I’m using client state to pass the query string to the InstantSearch component but for the life of me, I cannot seem to find any good documentation on how to actually pass it as a query. I tried every combination of Configure parameters but to no avail.

I could really use some help.

Thanks a lot!
Rein

Hi @reinvanimschoot,

In order to have InstantSearch to react to some state parameter you need to have a component that reacts to this part of the state. For example, with the search box you need to have a searchbox inside. In your case, you do not want an actual searchbox but you can use the connector of the search box to create a virtual widget. This will link instantsearch with the query.

Here is an example using react-instantsearch (it will work the same way with react-native): https://codesandbox.io/s/9j160x5l2o