Passing state to instantsearch

Hi, I’m currently using InstantSearch with React.
I would like to pass in a custom search query when a user makes a search.

    const searchClient = {
      async search(requests) {
        requests[0].params.query = this.state.searchQuery; // this.state is undefined
      async searchForFacetValues(requests) {
        return algoliaSearchClient.searchForFacetValues(requests);

How do I pass in this.state such that searchClient can get my custom query?

Thank you

This can be done with the prop searchState, although I’d suggest that you use a widget for it, as said here:

Hope that helps!