Prevent rerender of language switcher #1169
Replies: 3 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 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