From 31d75da69941178152dbea315fa9eb216870d465 Mon Sep 17 00:00:00 2001 From: Lukas Ruflair Date: Sat, 2 Sep 2023 15:11:54 -0700 Subject: [PATCH 1/2] Fix broken links to next.js docs Signed-off-by: Lukas Ruflair --- .../joy/integrations/next-js-app-router/next-js-app-router.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/data/joy/integrations/next-js-app-router/next-js-app-router.md b/docs/data/joy/integrations/next-js-app-router/next-js-app-router.md index 6665d12ed3d4f4..7a537e5260897d 100644 --- a/docs/data/joy/integrations/next-js-app-router/next-js-app-router.md +++ b/docs/data/joy/integrations/next-js-app-router/next-js-app-router.md @@ -106,7 +106,7 @@ export default function RootLayout(props) { ## Function props -Props passed from server components—for example `page.js` or other routing files—must be [serializable](https://nextjs.org/docs/getting-started/react-essentials#passing-props-from-server-to-client-components-serialization). +Props passed from server components-for example `page.js` or other routing files-must be [serializable](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#passing-props-from-server-to-client-components-serialization). This works without any additional directives: @@ -149,5 +149,5 @@ export default function Page() { } ``` -Instead, the Next.js team recommend moving components like these ["to the leaves"](https://nextjs.org/docs/getting-started/react-essentials#moving-client-components-to-the-leaves) to avoid this issue and improve overall performance. +Instead, the Next.js team recommend moving components like these ["down the tree"](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#moving-client-components-down-the-tree) to avoid this issue and improve overall performance. ::: From 2e06ce23e69484dd6dd2e84707f682f9b4ae8985 Mon Sep 17 00:00:00 2001 From: Lukas Ruflair Date: Sat, 2 Sep 2023 18:22:16 -0700 Subject: [PATCH 2/2] Fix other occurrences of broken links to next.js docs Signed-off-by: Lukas Ruflair --- .../data/base/guides/next-js-app-router/next-js-app-router.md | 4 ++-- .../material/guides/next-js-app-router/next-js-app-router.md | 4 ++-- examples/base-ui-nextjs-tailwind-ts/src/app/components.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/data/base/guides/next-js-app-router/next-js-app-router.md b/docs/data/base/guides/next-js-app-router/next-js-app-router.md index 060e3366eee2bc..7fe0a39569e9f4 100644 --- a/docs/data/base/guides/next-js-app-router/next-js-app-router.md +++ b/docs/data/base/guides/next-js-app-router/next-js-app-router.md @@ -195,5 +195,5 @@ export default function Page() { } ``` -Unfortunately, **this does not work in a Server Component** since function props are [non-serializable](https://nextjs.org/docs/getting-started/react-essentials#passing-props-from-server-to-client-components-serialization). -Instead, the Next.js team recommend moving components like these ["to the leaves"](https://nextjs.org/docs/getting-started/react-essentials#moving-client-components-to-the-leaves) to avoid this issue and improve overall performance. +Unfortunately, **this does not work in a Server Component** since function props are [non-serializable](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#passing-props-from-server-to-client-components-serialization). +Instead, the Next.js team recommend moving components like these ["down the tree"](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#moving-client-components-down-the-tree) to avoid this issue and improve overall performance. diff --git a/docs/data/material/guides/next-js-app-router/next-js-app-router.md b/docs/data/material/guides/next-js-app-router/next-js-app-router.md index c4771423e0d8d0..83c10c030dfd2e 100644 --- a/docs/data/material/guides/next-js-app-router/next-js-app-router.md +++ b/docs/data/material/guides/next-js-app-router/next-js-app-router.md @@ -178,7 +178,7 @@ Currently, `prepend` does not work reliably with the App Router, but you can wor ## Function props -Props passed from Server Components—for example `page.js` or other routing files—must be [serializable](https://nextjs.org/docs/getting-started/react-essentials#passing-props-from-server-to-client-components-serialization). +Props passed from Server Components—for example `page.js` or other routing files—must be [serializable](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#passing-props-from-server-to-client-components-serialization). This works without any additional directives: @@ -227,5 +227,5 @@ export default function Page() { } ``` -Instead, the Next.js team recommend moving components like these ["to the leaves"](https://nextjs.org/docs/getting-started/react-essentials#moving-client-components-to-the-leaves) to avoid this issue and improve overall performance. +Instead, the Next.js team recommend moving components like these ["down the tree"](https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#moving-client-components-down-the-tree) to avoid this issue and improve overall performance. ::: diff --git a/examples/base-ui-nextjs-tailwind-ts/src/app/components.tsx b/examples/base-ui-nextjs-tailwind-ts/src/app/components.tsx index a8751131922a31..86c63cae795749 100644 --- a/examples/base-ui-nextjs-tailwind-ts/src/app/components.tsx +++ b/examples/base-ui-nextjs-tailwind-ts/src/app/components.tsx @@ -34,7 +34,7 @@ const SelectButton = React.forwardRef(function SelectButton< // the components exported from this file have function props which are non-serializable // therefore they are additionally wrapped with 'use client' here -// https://nextjs.org/docs/getting-started/react-essentials#passing-props-from-server-to-client-components-serialization +// https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#passing-props-from-server-to-client-components-serialization export function SelectOption(props: OptionProps) { const {