Closed foldess closed 1 year ago
Hi, that's because findResultsState()
renders the component with no knowledge of Next.js Router context, so you need to provide it explicitly. You can check https://github.com/algolia/react-instantsearch/issues/3524#issuecomment-1160078935 for more info.
🐛 Bug description
When using
findResultsState
inside nextjs functiongetStaticProps
the nextjs router object declared usingconst router = useRouter()
is null instead of Server Router🔍 Bug reproduction
Steps to reproduce the behavior:
💭 Expected behavior
Router should not be undefined but server router instance
🖥 Screenshots
Environment