Closed Lium-7768 closed 1 year ago
We're doing a round of cleanup before migrating this repository to the new InstantSearch monorepo, so we're going to close it.
You can use the prop initialResults
on the widget <InstantSearchSSRProvider>
to forward the initial results to <InstantSearch>
. The initialResults
object shape should correspond to what's returned by the getServerState()
function.
🐛 Bug description
I'm trying to implement algolia with Gatsby SSG functionality into our platform via a POC.
🔍 Bug reproduction
Steps to reproduce the behavior:
serverdata
is the default value ofInstantSearchSSRProvider
, the hook has no initialized data, and the ui will not change.InstantSearchSSRProvider
component cannot implement the Gatsby SSG function without passing in the default valueLive reproduction:
https://codesandbox.io/p/github/Lium-Yu/gatsby-algolia/main?file=%2Fsrc%2Fpages%2Findex.js
github 🌰
💭 Expected behavior
InstantSSRProvider
should be able to give initial value, or give me other solutions, thanks.🖥 Screenshots
Environment