This is the React InstantSearch v7 documentation.
If you’re upgrading from v6, see the upgrade guide.
If you were using React InstantSearch Hooks,
this v7 documentation applies—just check for necessary changes.
To continue using v6, you can find the archived documentation.
Signature
Import
JavaScript
About this component
If you use Next.js’s App Router, a dedicated
react-instantsearch-nextjs
package is available.
To learn more, see App router.<InstantSearchSSRProvider>
is the provider component that forwards the server state to
<InstantSearch>
.
It’s designed to support server-side rendering (SSR) in your InstantSearch application.
To retrieve the server state and pass it down to the component,
you need to use getServerState
.
To learn more, see Server-side rendering
Examples
Props
The initial results to forward to
<InstantSearch>
.You should spread the whole server state object returned by getServerState
, which contains initialResults
.The part of the app that renders
<InstantSearch>
.