-
I have multiple indices, each for a language (as described). What would be the best approach to switch language in Next.JS? Options:
|
Beta Was this translation helpful? Give feedback.
Answered by
dhayab
May 15, 2023
Replies: 1 comment 2 replies
-
You should be able to force a remount of function Page() {
const [indexName, setIndexName] = useState('...');
/* ... */
return (
<InstantSearch searchClient={searchClient} indexName={indexName} key={indexName}>
{/* ... */}
</InstantSearch>
);
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
JanKups
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to force a remount of
<InstantSearch>
by setting itskey
prop to your index name state getter.