How would you make other hooks work with InstantSearchSSRProvider and Next.js? #5689
Unanswered
landermedia
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The component you're passing to function AppForSSR() {
return <InstantSearchSSRProvider ...>
<SearchBox />
<RefinementList />
...
getServerState(<AppForSSR />) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been really scratching my head over this as I couldn't make things other things such as other React context's. Here's a demo of InstantSearchSSRProvider with next-auth but I get an error such below
I also did tried to use a separate
ChildComponent
class as seen inindex2.tsx
but to no avail. Forgive my inexperience but you could point me in the right direction here if this isn't a bug? Thanks!PS: I've got more other hooks that seems to not recognize the context anymore in the real project where I encountered this issue. If I remove the
getServerSideProps
, everything works well.Beta Was this translation helpful? Give feedback.
All reactions