You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Update LocaleSwitcherSelect in example-app-router to match docs (#853 by @CodyDuff)
Updates LocaleSwitcherSelect.tsx in examples/example-app-router to match
the doc changes in commit
[de285f6](de285f6),
which fixed#581.
---------
Co-authored-by: Jan Amann <jan@amann.me>
Copy file name to clipboardexpand all lines: docs/pages/docs/environments/server-client-components.mdx
+37-35
Original file line number
Diff line number
Diff line change
@@ -171,6 +171,43 @@ By doing this, we can use interactive features from React like `useState` on tra
171
171
172
172
Learn more in the Next.js docs: [Passing Server Components to Client Components as Props](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#supported-pattern-passing-server-components-to-client-components-as-props)
173
173
174
+
<details>
175
+
<summary>Example: How can I implement a locale switcher?</summary>
176
+
177
+
If you implement a locale switcher as an interactive select, you can keep internationalization on the server side by rendering the labels from a Server Component and only marking the `select` element as a Client Component.
See also: [`useRouter`](/docs/routing/navigation#userouter)
208
+
209
+
</details>
210
+
174
211
<details>
175
212
<summary>Example: How can I implement a form?</summary>
176
213
@@ -217,41 +254,6 @@ export default function RegisterPage() {
217
254
218
255
</details>
219
256
220
-
<details>
221
-
<summary>Example: How can I implement a locale switcher?</summary>
222
-
223
-
If you implement a locale switcher as an interactive select, you can keep internationalization on the server side by rendering the labels from a Server Component and only marking the select element as a Client Component.
0 commit comments