diff --git a/docs/01-getting-started/index.mdx b/docs/01-getting-started/index.mdx new file mode 100644 index 0000000000000..df84fb94cf135 --- /dev/null +++ b/docs/01-getting-started/index.mdx @@ -0,0 +1,4 @@ +--- +title: Getting Started +description: Learn how to create full-stack web applications with Next.js. +--- diff --git a/docs/02-app/01-building-your-application/02-data-fetching/02-patterns.mdx b/docs/02-app/01-building-your-application/02-data-fetching/02-patterns.mdx index 854c0eae6cd1b..7425aa1986937 100644 --- a/docs/02-app/01-building-your-application/02-data-fetching/02-patterns.mdx +++ b/docs/02-app/01-building-your-application/02-data-fetching/02-patterns.mdx @@ -1,6 +1,5 @@ --- title: Data Fetching Patterns -nav_title: Patterns description: Learn about common data fetching patterns in React and Next.js. --- diff --git a/docs/02-app/01-building-your-application/03-rendering/02-client-components.mdx b/docs/02-app/01-building-your-application/03-rendering/02-client-components.mdx index c4c61bdd8dfad..eab9879e92909 100644 --- a/docs/02-app/01-building-your-application/03-rendering/02-client-components.mdx +++ b/docs/02-app/01-building-your-application/03-rendering/02-client-components.mdx @@ -90,7 +90,7 @@ Then, on the client: 3. The JavaScript instructions are used to [hydrate](https://react.dev/reference/react-dom/client/hydrateRoot) Client Components and make their UI interactive. > **What is hydration?** - +> > Hydration is process of attaching event listeners to the DOM, to make the static HTML interactive. Behind the scenes, hydration is done with the [`hydrateRoot`](https://react.dev/reference/react-dom/client/hydrateRoot) React API. ### Subsequent Navigations diff --git a/docs/02-app/01-building-your-application/03-rendering/03-composition-patterns.mdx b/docs/02-app/01-building-your-application/03-rendering/03-composition-patterns.mdx index 766d9f74a4447..88d21febf0619 100644 --- a/docs/02-app/01-building-your-application/03-rendering/03-composition-patterns.mdx +++ b/docs/02-app/01-building-your-application/03-rendering/03-composition-patterns.mdx @@ -1,6 +1,6 @@ --- title: Server and Client Composition Patterns -nav_title: Patterns +nav_title: Composition Patterns description: Recommended patterns for using Server and Client Components. --- @@ -346,9 +346,9 @@ You can optimize your package by using ['use client' deeper in the tree](#moving It's worth noting some bundlers might strip out `"use client"` directives. You can find an example of how to configure esbuild to include the `"use client"` directive in the [React Wrap Balancer](https://github.com/shuding/react-wrap-balancer/blob/main/tsup.config.ts#L10-L13) and [Vercel Analytics](https://github.com/vercel/analytics/blob/main/packages/web/tsup.config.js#L26-L30) repositories. -### Client Components +## Client Components -#### Moving Client Components Down the Tree +### Moving Client Components Down the Tree To reduce the Client JavaScript bundle size, we recommend moving Client Components down your component tree. @@ -463,7 +463,7 @@ export default function ClientComponent({ children }) { } ``` -#### Supported Pattern: Passing Server Components to Client Components as Props +### Supported Pattern: Passing Server Components to Client Components as Props The following pattern is supported. You can pass Server Components as a prop to a Client Component.