Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Document caching mechanisms #52514

Merged
merged 164 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
071f700
Create 01-caching.mdx
delbaoliveira Jul 10, 2023
b534f16
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 10, 2023
9fa56bf
Write about request deduplication
delbaoliveira Jul 11, 2023
9302582
Iterate over table
delbaoliveira Jul 11, 2023
29cea97
Create new caching section
delbaoliveira Jul 11, 2023
b1b3e90
Split pages
delbaoliveira Jul 11, 2023
77fa471
Write about the Router Cache
delbaoliveira Jul 11, 2023
3fb4b4d
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 11, 2023
4545afa
Write note on cookies
delbaoliveira Jul 11, 2023
ec819a9
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 11, 2023
5cdb0b1
💅🏼
delbaoliveira Jul 12, 2023
692c0e8
Write about data cache
delbaoliveira Jul 12, 2023
f153e93
Outline and explain Render Cache works (wip)
delbaoliveira Jul 12, 2023
b73a19d
:nail_care:
delbaoliveira Jul 12, 2023
e9e46d8
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 12, 2023
9a0ef50
Re-order pages based on the request lifecycle
delbaoliveira Jul 13, 2023
1949046
Iterate over descriptions
delbaoliveira Jul 13, 2023
bba6718
Iterate over render cache explanation
delbaoliveira Jul 13, 2023
db27cd5
Continue writing about render cache
delbaoliveira Jul 17, 2023
14c8b79
💅
delbaoliveira Jul 17, 2023
5b9fbeb
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 17, 2023
1353a1d
Cache rules everything around me
delbaoliveira Jul 17, 2023
8ae00e9
Iterate over React and Data Cache
delbaoliveira Jul 18, 2023
e9f4eb7
Consolidate Render Cache page
delbaoliveira Jul 18, 2023
3886475
Consolidate Route Cache Page
delbaoliveira Jul 18, 2023
6f86ca5
Review the Router Cache
delbaoliveira Jul 18, 2023
2f271eb
Review the Render Cache
delbaoliveira Jul 18, 2023
353bba0
Write about cache interactions
delbaoliveira Jul 18, 2023
f1e505e
Consolidate APIs
delbaoliveira Jul 18, 2023
b283302
Create placeholder page for explaining how RCs are rendered by Next.js
delbaoliveira Jul 18, 2023
9d6bdfc
Move partial rendering section to "how navigation works"
delbaoliveira Jul 18, 2023
912b347
Add missing links
delbaoliveira Jul 18, 2023
44b76bd
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 18, 2023
1df38c6
Fix broken links
delbaoliveira Jul 18, 2023
4de0c41
Typo
delbaoliveira Jul 18, 2023
fe864d6
Remove advanced "routing" section from fundamentals page
delbaoliveira Jul 18, 2023
84dd428
Review Linking and Navigating page
delbaoliveira Jul 18, 2023
0c5fbeb
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 18, 2023
100d2d2
Rewrite prefetching section
delbaoliveira Jul 19, 2023
a47e590
Move note about Server Actions to caching page
delbaoliveira Jul 19, 2023
eb81c40
Write about caching during navigation
delbaoliveira Jul 19, 2023
9873231
Review partial rendering section
delbaoliveira Jul 19, 2023
3d27505
Add Seb's note on 30s caching for prefetch=false
delbaoliveira Jul 19, 2023
448129f
Add note about default prefetch=false for dynamic routes
delbaoliveira Jul 19, 2023
8803e6c
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 19, 2023
a2bab46
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
ab77ba5
Update docs/02-app/02-api-reference/02-file-conventions/layout.mdx
delbaoliveira Jul 19, 2023
64e7f04
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
938b165
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
e4dc01b
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
ae16e01
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
0efdaed
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
5cc517d
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
b77eed8
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
1f00dfd
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
3dcd96d
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 19, 2023
5b06e3d
Apply Tim's feedback
delbaoliveira Jul 19, 2023
12a796f
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 19, 2023
4a819d2
Remove the concept of hard navigation
delbaoliveira Jul 19, 2023
f6a018d
Document the scroll behavior for back/forward navigation
delbaoliveira Jul 19, 2023
3fbd489
Add related links
delbaoliveira Jul 19, 2023
c5d615f
💅🏼
delbaoliveira Jul 19, 2023
6aa667b
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 20, 2023
2be71f3
Simplify data fetching section (wip)
delbaoliveira Jul 20, 2023
5646b3b
Continue working on data fetching section (wip)
delbaoliveira Jul 20, 2023
ddb2f09
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
18b5c7b
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
d0f0f39
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
4f683d6
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
36c7e81
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
195d657
Rewrite data fetching patterns
delbaoliveira Jul 21, 2023
73474c2
Clean up data fetching section
delbaoliveira Jul 21, 2023
986b0e7
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 21, 2023
d73c4fc
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
8b4b3e7
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
51fc6ae
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
df9e4fd
Rename render cache to full route cache
delbaoliveira Jul 21, 2023
211bf3c
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 21, 2023
a3730b4
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
06e9be5
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 21, 2023
8b1bc1a
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 21, 2023
f51b1ff
React Payload -> RSC Payload
delbaoliveira Jul 21, 2023
083c6cf
Update index.mdx
delbaoliveira Jul 21, 2023
101d2e8
Apply Tim's feedback
delbaoliveira Jul 21, 2023
05b2730
Test hash links in related links
delbaoliveira Jul 21, 2023
9c6660d
Update rendering page
delbaoliveira Jul 24, 2023
7522af0
Re-order rendering pages
delbaoliveira Jul 24, 2023
24e8eb4
Rewrite rendering index page
delbaoliveira Jul 24, 2023
8084e7e
Make static and dynamic rendering the first page (as it's simpler)
delbaoliveira Jul 24, 2023
fb8c826
Runtime -> Request time (keep runtime for node.js and edge)
delbaoliveira Jul 24, 2023
5f778a0
Update note on hash link
delbaoliveira Jul 24, 2023
9d284a7
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 24, 2023
0192e85
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 24, 2023
5918117
Apply suggestions from code review
delbaoliveira Jul 24, 2023
c4ea159
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 24, 2023
9e4f91e
Re-order rendering and data fetching sections
delbaoliveira Jul 24, 2023
ba4d9f6
Re-order docs
delbaoliveira Jul 24, 2023
0149565
Add section on how on-demand revalidation works
delbaoliveira Jul 24, 2023
816c019
Remove instances of "on each request"
delbaoliveira Jul 24, 2023
7c5f238
Misc
delbaoliveira Jul 24, 2023
46e2fcc
Apply suggestions from code review
delbaoliveira Jul 24, 2023
6a2a03d
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 24, 2023
9fcb248
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 24, 2023
a70b9df
Remove mention of static and dynamic data fetching
delbaoliveira Jul 24, 2023
d6e3bee
Fix headings
delbaoliveira Jul 24, 2023
e516026
Apply suggestions from code review
delbaoliveira Jul 24, 2023
a4361fd
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 24, 2023
027d61d
Apply suggestions from code review
delbaoliveira Jul 24, 2023
7133d3a
Clarify streaming server rendering
delbaoliveira Jul 24, 2023
6e85f5d
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 24, 2023
c90c02d
Document how `generateStaticParams` affects the Full Route Cache
delbaoliveira Jul 24, 2023
4890cfc
Apply suggestions from code review
delbaoliveira Jul 24, 2023
58d56eb
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 24, 2023
c7529e9
Apply suggestions from code review
delbaoliveira Jul 24, 2023
140b574
Add note on router.refresh
delbaoliveira Jul 24, 2023
287aedd
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 24, 2023
d4a8c1b
Fix note about POST deduping, it's cached, not deduped
delbaoliveira Jul 24, 2023
b45ad12
Rename `router-handlers` file to `route-handlers`
delbaoliveira Jul 24, 2023
1b4f246
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 25, 2023
573a183
Apply Tim's feedback
delbaoliveira Jul 25, 2023
a87aeea
Missing .
delbaoliveira Jul 25, 2023
e79c74d
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 25, 2023
a68e12c
More feedback
delbaoliveira Jul 25, 2023
62724c5
Fix broken links
delbaoliveira Jul 25, 2023
c43980b
Clean up
delbaoliveira Jul 25, 2023
0713a1a
Clean up
delbaoliveira Jul 25, 2023
e8a2471
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 25, 2023
a0c4385
Clean up
delbaoliveira Jul 25, 2023
cc9ed46
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 25, 2023
91323a2
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 26, 2023
668e367
Clean up
delbaoliveira Jul 26, 2023
818ccca
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 26, 2023
2feb33c
Apply suggestions from code review
delbaoliveira Jul 26, 2023
8d2ddf2
Add caching overview diagram
delbaoliveira Jul 26, 2023
02937ae
Add request memoization diagram
delbaoliveira Jul 26, 2023
259c1b5
Add data cache diagram
delbaoliveira Jul 26, 2023
0e03646
Add revalidation diagrams and remove duplicate content
delbaoliveira Jul 26, 2023
29f3cc3
Add full route cache diagram
delbaoliveira Jul 26, 2023
8de3bcd
Add diagram that highlights difference between static and dynamic ren…
delbaoliveira Jul 26, 2023
42a0e27
General clean up
delbaoliveira Jul 26, 2023
3da96be
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 27, 2023
c972b17
Clean up
delbaoliveira Jul 27, 2023
acc706d
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 27, 2023
4113fd3
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 27, 2023
7d9e970
Clean up
delbaoliveira Jul 27, 2023
1918646
Review
delbaoliveira Jul 28, 2023
45ea561
Update docs/02-app/01-building-your-application/04-caching/index.mdx
delbaoliveira Jul 28, 2023
5e32ab4
Add that memoization applies to GET requests
delbaoliveira Jul 28, 2023
6952ea7
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 28, 2023
a8415a2
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 28, 2023
a226618
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 31, 2023
6c53792
Clarify when fetch requests are not cached (maybe)
delbaoliveira Jul 31, 2023
20997d9
Improve on-demand revalidation example
delbaoliveira Jul 31, 2023
3b744bf
Feedback
delbaoliveira Jul 31, 2023
d39f142
Apply suggestions from code review
delbaoliveira Jul 31, 2023
49a54c2
Feedback
delbaoliveira Jul 31, 2023
a6fefc8
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 31, 2023
888280b
Improve preload() example
delbaoliveira Jul 31, 2023
e5d050a
Swap columns in dynamically rendered table
delbaoliveira Jul 31, 2023
805b3cb
Apply suggestions from code review
delbaoliveira Jul 31, 2023
b24b928
Merge branch 'canary' into docs-7gjo
delbaoliveira Jul 31, 2023
ee330cb
Mooore feedback
delbaoliveira Jul 31, 2023
ffbbad6
Merge branch 'docs-7gjo' of https://github.com/vercel/next.js into do…
delbaoliveira Jul 31, 2023
61257bd
Merge branch 'canary' into docs-7gjo
leerob Jul 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@ title: Linking and Navigating
description: Learn how navigation works in Next.js, and how to use the Link Component and `useRouter` hook.
---

The Next.js router uses [server-centric routing](/docs/app/building-your-application/routing#server-centric-routing-with-client-side-navigation) with [client-side navigation](#how-navigation-works). It supports [instant loading states](/docs/app/building-your-application/routing/loading-ui-and-streaming) and [concurrent rendering](https://react.dev/reference/react/startTransition). This means navigation maintains client-side state, avoids expensive re-renders, is interruptible, and doesn't cause race conditions.
There are two ways to navigate between routes in Next.js:

There are two ways to navigate between routes:

- [`<Link>` Component](#link-component)
- [`useRouter` Hook](#userouter-hook)
- Using [`<Link>` Component](#link-component)
- Using [`useRouter` Hook](#userouter-hook)
delbaoliveira marked this conversation as resolved.
Show resolved Hide resolved

This page will go through how to use `<Link>`, `useRouter()`, and dive deeper into how navigation works.

## `<Link>` Component

`<Link>` is a React component that extends the HTML `<a>` element to provide [prefetching](#prefetching) and client-side navigation between routes. It is the primary way to navigate between routes in Next.js.
`<Link>` is a built-in component that extends the HTML `<a>` tag to provide [prefetching](#prefetching) and client-side navigation between routes. It is the primary way to navigate between routes in Next.js.

To use `<Link>`, import it from `next/link`, and pass a `href` prop to the component:
You can use it by importing it from `next/link`, and passing a `href` prop to the component:

```tsx filename="app/page.tsx" switcher
import Link from 'next/link'
Expand All @@ -34,11 +32,11 @@ export default function Page() {
}
```

There are optional props you can pass to `<Link>`. See the [API reference](/docs/app/api-reference/components/link) for more information.
There are other optional props you can pass to `<Link>`. See the [API reference](/docs/app/api-reference/components/link) for more.

## Examples
### Examples

### Linking to Dynamic Segments
#### Linking to Dynamic Segments

When linking to [dynamic segments](/docs/app/building-your-application/routing/dynamic-routes), you can use [template literals and interpolation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) to generate a list of links. For example, to generate a list of blog posts:

Expand All @@ -58,7 +56,7 @@ export default function PostList({ posts }) {
}
```

### Checking Active Links
#### Checking Active Links

You can use [`usePathname()`](/docs/app/api-reference/functions/use-pathname) to determine if a link is active. For example, to add a class to the active link, you can check if the current `pathname` matches the `href` of the link:

Expand Down Expand Up @@ -93,13 +91,22 @@ export function Navigation({ navLinks }) {

### Scrolling to an `id`

The default behavior of `<Link>` is to [scroll to the top of the route segment that has changed](#focus-and-scroll-management). When there is an `id` defined in `href`, it will scroll to the specific `id`, similarly to a normal `<a>` tag.
The default behavior of `<Link>` is to scroll to the top of a new route or to maintain the scroll position for backwards and fowards navigation.

If you'd like to scroll to a specific `id` on navigation, you can append the `href` string with a `#` hash link since `<Link>` renders to a `<a>` tag.

```jsx
<Link href="/dashboard#settings">Settings</Link>

// Output
<a href="/dashboard#settings">Settings</a>
```

## `useRouter()` Hook

The `useRouter` hook allows you to programmatically change routes inside [Client Components](/docs/getting-started/react-essentials).
The `useRouter` hook allows you to programmatically change routes.

To use `useRouter`, import it from `next/navigation`, and call the hook inside your Client Component:
Since it's a hook, you can only use it inside Client Components. The hook is imported from `next/navigation`.
delbaoliveira marked this conversation as resolved.
Show resolved Hide resolved

```jsx filename="app/page.js"
'use client'
Expand All @@ -117,15 +124,15 @@ export default function Page() {
}
```

The `useRouter` provides methods such as `push()`, `refresh()`, and more. See the [API reference](/docs/app/api-reference/functions/use-router) for more information.
For a full list of `useRouter` methods, see the [API reference](/docs/app/api-reference/functions/use-router).

> **Recommendation:** Use the `<Link>` component to navigate between routes unless you have a specific requirement for using `useRouter`.

## How Navigation Works

- A route transition is initiated using `<Link>` or calling `router.push()`.
- The router updates the URL in the browser's address bar.
- The router avoids unnecessary work by re-using segments that haven't changed (e.g. shared layouts) from the [client-side cache](#client-side-caching-of-rendered-server-components). This is also referred to as [partial rendering](/docs/app/building-your-application/routing#partial-rendering).
- The router avoids unnecessary work by re-using segments that haven't changed (e.g. shared layouts) from the [client-side cache](#client-side-caching-of-rendered-server-components). This is also referred to as [partial rendering](#partial-rendering).
- If the [conditions of soft navigation](#conditions-for-soft-navigation) are met, the router fetches the new segment from the cache rather than the server. If not, the router performs a [hard navigation](#hard-navigation) and fetches the Server Component payload from the server.
- If created, [loading UI](/docs/app/building-your-application/routing/loading-ui-and-streaming) is shown from the server while the payload is being fetched.
- The router uses the cached or fresh payload to render the new segments on the client.
Expand Down Expand Up @@ -160,6 +167,20 @@ By default, routes are prefetched as they become visible in the viewport when us
> - Prefetching is only enabled in production.
> - Prefetching can be disabled by passing `prefetch={false}` to `<Link>`.

## Partial Rendering

When navigating between sibling routes (e.g. `/dashboard/settings` and `/dashboard/analytics` below), Next.js will only fetch and render the layouts and pages in routes that change. It will **not** re-fetch or re-render anything above the segments in the subtree. This means that in routes that share a layout, the layout will be preserved when a user navigates between sibling pages.

<Image
alt="How partial rendering works"
srcLight="/docs/light/partial-rendering.png"
srcDark="/docs/dark/partial-rendering.png"
width="1600"
height="945"
/>

Without partial rendering, each navigation would cause the full page to re-render on the server. Rendering only the segment that’s updating reduces the amount of data transferred and execution time, leading to improved performance.

### Soft Navigation
delbaoliveira marked this conversation as resolved.
Show resolved Hide resolved

On navigation, the cache for changed segments is reused (if it exists), and no new requests are made to the server for data.
Expand Down
24 changes: 0 additions & 24 deletions docs/02-app/01-building-your-application/01-routing/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,30 +146,6 @@ This is because while folders define routes, only the contents returned by `page

Learn more about [Project Organization and Colocation](/docs/app/building-your-application/routing/colocation).

## Server-Centric Routing with Client-side Navigation

Unlike the `pages` directory which uses client-side routing, the App Router uses **server-centric routing** to align with [Server Components](/docs/getting-started/react-essentials#server-components) and [data fetching on the server](/docs/app/building-your-application/data-fetching/fetching). With server-centric routing, the client does not have to download a route map and the same request for Server Components can be used to look up routes. This optimization is useful for all applications, but has a larger impact on applications with many routes.

Although routing is server-centric, the router uses **client-side navigation** with the [Link Component](/docs/app/building-your-application/routing/linking-and-navigating#link-component) - resembling the behavior of a Single-Page Application. This means when a user navigates to a new route, the browser will not reload the page. Instead, the URL will be updated and Next.js will [only render the segments that change](#partial-rendering).

Additionally, as users navigate around the app, the router will store the result of the React Server Component payload in an **in-memory client-side cache**. The cache is split by route segments which allows invalidation at any level and ensures consistency across [React's concurrent renders](https://react.dev/blog/2022/03/29/react-v18#what-is-concurrent-react). This means that for certain cases, the cache of a previously fetched segment can be re-used, further improving performance.

Learn more about [Linking and Navigating](/docs/app/building-your-application/routing/linking-and-navigating).

## Partial Rendering
delbaoliveira marked this conversation as resolved.
Show resolved Hide resolved

When navigating between sibling routes (e.g. `/dashboard/settings` and `/dashboard/analytics` below), Next.js will only fetch and render the layouts and pages in routes that change. It will **not** re-fetch or re-render anything above the segments in the subtree. This means that in routes that share a layout, the layout will be preserved when a user navigates between sibling pages.

<Image
alt="How partial rendering works"
srcLight="/docs/light/partial-rendering.png"
srcDark="/docs/dark/partial-rendering.png"
width="1600"
height="945"
/>

Without partial rendering, each navigation would cause the full page to re-render on the server. Rendering only the segment that’s updating reduces the amount of data transferred and execution time, leading to improved performance.

## Advanced Routing Patterns

The App Router also provides a set of conventions to help you implement more advanced routing patterns. These include:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: React Components
description: Learn how Server and Client Components are rendered in Next.js.
---

This page is currently being written. Follow along and give feedback on [GitHub](https://github.com/vercel/next.js/pull/51579).
Loading
Loading