Skip to content

Commit a016ea3

Browse files
Getting Started docs: Consistent casing and naming (#74637)
1 parent 3813b2c commit a016ea3

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

docs/01-app/01-getting-started/05-css-and-styling.mdx renamed to docs/01-app/01-getting-started/05-css.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How to use CSS in your application
3-
nav_title: CSS and Styling
3+
nav_title: CSS
44
description: Learn about the different ways to add CSS to your application, including CSS Modules, Global CSS, Tailwind CSS, and more.
55
related:
66
title: API Reference

docs/01-app/01-getting-started/06-data-fetching-and-streaming.mdx renamed to docs/01-app/01-getting-started/06-fetching-data.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How to fetch data and stream
3-
nav_title: Fetching data and streaming
3+
nav_title: Fetching Data
44
description: Start fetching data and streaming content in your application.
55
related:
66
title: API Reference

docs/01-app/01-getting-started/08-mutating-data.mdx renamed to docs/01-app/01-getting-started/07-updating-data.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: How to mutate data
3-
nav_title: Mutating Data
4-
description: Learn how to mutate data in your Next.js application.
2+
title: How to update data
3+
nav_title: Updating Data
4+
description: Learn how to update data in your Next.js application.
55
related:
66
title: API Reference
77
description: Learn more about the features mentioned in this page by reading the API Reference.
@@ -11,7 +11,7 @@ related:
1111
- app/api-reference/functions/redirect
1212
---
1313

14-
You can mutate data in Next.js using React's [Server Functions](https://react.dev/reference/rsc/server-functions). This page will go through how you can [create](#creating-server-functions) and [invoke](#invoking-server-functions) Server Functions.
14+
You can update data in Next.js using React's [Server Functions](https://react.dev/reference/rsc/server-functions). This page will go through how you can [create](#creating-server-functions) and [invoke](#invoking-server-functions) Server Functions.
1515

1616
## Creating Server Functions
1717

@@ -42,7 +42,7 @@ export default function Page() {
4242
// Server Action
4343
async function createPost() {
4444
'use server'
45-
// Mutate data
45+
// Update data
4646
// ...
4747

4848
return <></>
@@ -54,7 +54,7 @@ export default function Page() {
5454
// Server Action
5555
async function createPost() {
5656
'use server'
57-
// Mutate data
57+
// Update data
5858
// ...
5959
}
6060

@@ -146,7 +146,7 @@ export async function createPost(formData: FormData) {
146146
const title = formData.get('title')
147147
const content = formData.get('content')
148148

149-
// Mutate data
149+
// Update data
150150
// Revalidate cache
151151
}
152152
```
@@ -158,7 +158,7 @@ export async function createPost(formData) {
158158
const title = formData.get('title')
159159
const content = formData.get('content')
160160

161-
// Mutate data
161+
// Update data
162162
// Revalidate cache
163163
}
164164
```
@@ -261,15 +261,15 @@ export function Button() {
261261
262262
### Revalidating the cache
263263
264-
After performing a mutation, you can revalidate the Next.js cache and show the updated data by calling [`revalidatePath`](/docs/app/api-reference/functions/revalidatePath) or [`revalidateTag`](/docs/app/api-reference/functions/revalidateTag) within the Server Function:
264+
After performing an update, you can revalidate the Next.js cache and show the updated data by calling [`revalidatePath`](/docs/app/api-reference/functions/revalidatePath) or [`revalidateTag`](/docs/app/api-reference/functions/revalidateTag) within the Server Function:
265265
266266
```ts filename="app/lib/actions.ts" switcher
267267
'use server'
268268

269269
import { revalidatePath } from 'next/cache'
270270

271271
export async function createPost(formData: FormData) {
272-
// Mutate data
272+
// Update data
273273
// ...
274274

275275
revalidatePath('/posts')
@@ -282,23 +282,23 @@ export async function createPost(formData: FormData) {
282282
import { revalidatePath } from 'next/cache'
283283

284284
export async function createPost(formData) {
285-
// Mutate data
285+
// Update data
286286
// ...
287287
revalidatePath('/posts')
288288
}
289289
```
290290
291291
### Redirecting
292292
293-
You may want to redirect the user to a different page after performing a mutation. You can do this by calling [`redirect`](/docs/app/api-reference/functions/redirect) within the Server Function:
293+
You may want to redirect the user to a different page after performing an update. You can do this by calling [`redirect`](/docs/app/api-reference/functions/redirect) within the Server Function:
294294
295295
```ts filename="app/lib/actions.ts" switcher
296296
'use server'
297297

298298
import { redirect } from 'next/navigation'
299299

300300
export async function createPost(formData: FormData) {
301-
// Mutate data
301+
// Update data
302302
// ...
303303

304304
redirect('/posts')
@@ -311,7 +311,7 @@ export async function createPost(formData: FormData) {
311311
import { redirect } from 'next/navigation'
312312

313313
export async function createPost(formData) {
314-
// Mutate data
314+
// Update data
315315
// ...
316316

317317
redirect('/posts')

docs/01-app/01-getting-started/09-error-handling.mdx renamed to docs/01-app/01-getting-started/08-error-handling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: How to handle errors
3-
nav_title: Error handling
3+
nav_title: Error Handling
44
description: Learn how to display expected errors and handle uncaught exceptions.
55
related:
66
title: API Reference

docs/01-app/03-building-your-application/11-upgrading/08-single-page-applications.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default function RootLayout({ children }) {
7979
}
8080
```
8181

82-
While you can [defer and pass a single Promise](/docs/app/getting-started/data-fetching-and-streaming#with-the-use-hook) as a prop to a client component, we generally see this pattern paired with a React context provider. This enables easier access from client components with a custom React hook.
82+
While you can [defer and pass a single Promise](/docs/app/getting-started/fetching-data#with-the-use-hook) as a prop to a client component, we generally see this pattern paired with a React context provider. This enables easier access from client components with a custom React hook.
8383

8484
You can forward a Promise to the React context provider:
8585

0 commit comments

Comments
 (0)