Add documentation about onSearchParameters

After upgrading to v6 of react-instantsearch I’ve had issues retrieving proper results from thefindResulsState method.
Eventually I found out that you’ve introduced a new property that needs to be passed along to the <InstantSearch> container.

The only place this is mentioned is in the code examples. Is it possible to make it more clear from the documentation what this does, and that it is important to pass along?

Hi @bas.g
You’re correct, this is only mentioned in the code example of the upgrade guide.
We’ve also updated the SSR guide to reflect that.
But it might still not be clear for someone moving from ^5.0.0

What do you think could be a better way to raise awareness around theses changes, any suggestions?

Hi @Youcef, thank you for your response. Now that I’ve found the cause of the issue and know where to look it all seems to be quite obvious. :crazy_face:

A possible improvement could be on the SSR page . Maybe you could mention in the first bullet point whichever extra props are passed to provided component.

To give you more context about why I ran into this issue is because we used the findResultsState as follows:

const resultsState = findResultsState( 
  () =>  (
    <ConfigProvider {...props}>
      <VirtualInstantSearchComponent/>
    </ConfigProvider >
   ), { ...props}
)

The props contained all the usual configurations that were previously supported. As you can see I totally missed the provided props from the findResultsState function. It is solved by using it as follows:

const resultsState = findResultsState( 
  (providedProps) =>  (
    <ConfigProvider {...providedProps}>
      <VirtualInstantSearchComponent/>
    </ConfigProvider >
   ), { ...props}
)

In another question, and maybe an improvement :slight_smile: , are there types available for findResultsState?