Skip to content
Discussion options

You must be logged in to vote

Yes, that is possible, but you'd have to make sure your entire app is renderable when you pass it to getServerState, and thus has no calls to useQuery for example.

What you could do, to still ensure everything working with both the global setup and app to find the server state, is to split up into two different components:

// InstantSearch-implementation.tsx

// implement and export all InstantSearch widgets here, so they are colocated
// use this also in your real application

function MockApp() {
  return (
  <InstantSearch>
  {/* render all components using InstantSearch */}
  </InstantSearch>
  )
}

// use <MockApp /> in getServerState

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Jezfx
Comment options

@Haroenv
Comment options

Answer selected by Jezfx
@Jezfx
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants