Prevent rerender of language switcher #1169
Replies: 4 comments
-
Next.js remounts the relevant page and layout when a dynamic segment like For cross-page transitions I guess you'd need something like View Transitions (example) or Framer Motion (there might be rough edges though). |
Beta Was this translation helpful? Give feedback.
-
In my case if I call |
Beta Was this translation helpful? Give feedback.
-
@amannn |
Beta Was this translation helpful? Give feedback.
-
I have same problem
from my code will render 3 times after change language |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I don't know whether this is expected but I assume it's an issue: my language switcher component does a full rerender each time I switch the language, meaning the transition of the toggle is interrupted. I'm following the guide from the docs: https://next-intl-docs.vercel.app/docs/routing/navigation#userouter-change-locale
Any help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions