Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8c32a07
Re-order pages
delbaoliveira Nov 29, 2023
09e30dc
Rename form-and-mutations to server-actions-and-mutations
delbaoliveira Nov 29, 2023
202bcbe
Restructure page
delbaoliveira Nov 29, 2023
4724567
Add "What are Server Actions" section
delbaoliveira Nov 29, 2023
3b4e09b
Add "How Server Actions" work section
delbaoliveira Nov 29, 2023
fe4d134
Explain "use server" and add RSC and RCC examples
delbaoliveira Nov 29, 2023
687239c
Expand on the "Server-only forms" example
delbaoliveira Nov 29, 2023
77c99e9
Use try/catch in examples instead of 2nd function
delbaoliveira Nov 29, 2023
5b38723
Improve form validation example, use safeParse
delbaoliveira Nov 29, 2023
7ddb1a8
Reorganize sections
delbaoliveira Nov 29, 2023
a849c3d
Update links
delbaoliveira Nov 29, 2023
09dd302
Fix broken links
delbaoliveira Nov 29, 2023
2eee2b4
Add placeholder for allowedOrigins
delbaoliveira Nov 29, 2023
23e08cd
Tweaks
delbaoliveira Nov 29, 2023
5bedb17
Add "Built-in CSRF Protection" section
delbaoliveira Nov 29, 2023
d679198
Merge branch 'canary' into docs-server-actions-7ghd
delbaoliveira Nov 30, 2023
bf3f619
Split /app and /pages content to make it easier to edit
delbaoliveira Nov 30, 2023
ccef54f
Add tainting section
delbaoliveira Nov 30, 2023
d5af139
Fix headings
delbaoliveira Nov 30, 2023
26954a5
Add security examples
delbaoliveira Nov 30, 2023
eb0d5dc
Misc
delbaoliveira Nov 30, 2023
8e5c1dd
Merge branch 'canary' into docs-server-actions-7ghd
delbaoliveira Nov 30, 2023
dbf3844
Merge branch 'canary' into docs-server-actions-7ghd
delbaoliveira Dec 1, 2023
cad4b0f
Review
delbaoliveira Dec 1, 2023
9ea54eb
Add bind argument, merge and delete API page
delbaoliveira Dec 1, 2023
81404e3
Add `useEffect` and event handler examples
delbaoliveira Dec 1, 2023
bc5669d
Merge branch 'canary' into docs-server-actions-7ghd
delbaoliveira Dec 4, 2023
67ba1fd
Add section descriptions
delbaoliveira Dec 4, 2023
32f18cd
Review
delbaoliveira Dec 4, 2023
0e665a7
Fix links
delbaoliveira Dec 4, 2023
92f481f
Apply suggestions from code review
delbaoliveira Dec 4, 2023
a640ca9
Remove id
delbaoliveira Dec 4, 2023
90875ee
Remove default from action.ts examples
delbaoliveira Dec 4, 2023
f4fc792
Apply Andrew's feedback
delbaoliveira Dec 4, 2023
0018e94
Update intro
delbaoliveira Dec 4, 2023
3e9d259
Merge branch 'canary' into docs-server-actions-7ghd
delbaoliveira Dec 4, 2023
bbc9a71
Apply suggestions from code review
delbaoliveira Dec 5, 2023
49299e9
Apply suggestions from code review
delbaoliveira Dec 6, 2023
49785cd
Apply suggestions from code review
delbaoliveira Dec 6, 2023
8d10578
Implement feedback
delbaoliveira Dec 6, 2023
a5b2250
Merge branch 'docs-server-actions-7ghd' of https://github.com/vercel/…
delbaoliveira Dec 6, 2023
61e3da4
Implement feedback
delbaoliveira Dec 6, 2023
de426da
Add note about flag being needed for earlier Next.js versions
delbaoliveira Dec 6, 2023
f688bb6
Merge branch 'canary' into docs-server-actions-7ghd
manovotny Dec 7, 2023
5803bc9
Merge branch 'canary' into docs-server-actions-7ghd
delbaoliveira Dec 7, 2023
cc39e42
Update docs/02-app/01-building-your-application/02-data-fetching/02-s…
delbaoliveira Dec 7, 2023
8a5829e
Update docs/02-app/01-building-your-application/02-data-fetching/02-s…
delbaoliveira Dec 7, 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 @@ -160,7 +160,7 @@ export async function POST() {
}
```

> **Good to know**: Like API Routes, Route Handlers can be used for cases like handling form submissions. A new abstraction for [handling forms and mutations](/docs/app/building-your-application/data-fetching/forms-and-mutations) that integrates deeply with React is being worked on.
> **Good to know**: Like API Routes, Route Handlers can be used for cases like handling form submissions. A new abstraction for [handling forms and mutations](/docs/app/building-your-application/data-fetching/server-actions-and-mutations) that integrates deeply with React is being worked on.

### Route Resolution

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ There are four ways you can fetch data:

Next.js extends the native [`fetch` Web API](https://developer.mozilla.org/docs/Web/API/Fetch_API) to allow you to configure the [caching](#caching-data) and [revalidating](#revalidating-data) behavior for each fetch request on the server. React extends `fetch` to automatically [memoize](/docs/app/building-your-application/data-fetching/patterns#fetching-data-where-its-needed) fetch requests while rendering a React component tree.

You can use `fetch` with `async`/`await` in Server Components, in [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and in [Server Actions](/docs/app/building-your-application/data-fetching/forms-and-mutations).
You can use `fetch` with `async`/`await` in Server Components, in [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and in [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations).

For example:

Expand Down Expand Up @@ -117,7 +117,7 @@ Learn more about [time-based revalidation](/docs/app/building-your-application/c

#### On-demand Revalidation

Data can be revalidated on-demand by path ([`revalidatePath`](/docs/app/api-reference/functions/revalidatePath)) or by cache tag ([`revalidateTag`](/docs/app/api-reference/functions/revalidateTag)) inside a [Server Action](/docs/app/building-your-application/data-fetching/forms-and-mutations) or [Route Handler](/docs/app/building-your-application/routing/route-handlers).
Data can be revalidated on-demand by path ([`revalidatePath`](/docs/app/api-reference/functions/revalidatePath)) or by cache tag ([`revalidateTag`](/docs/app/api-reference/functions/revalidateTag)) inside a [Server Action](/docs/app/building-your-application/data-fetching/server-actions-and-mutations) or [Route Handler](/docs/app/building-your-application/routing/route-handlers).

Next.js has a cache tagging system for invalidating `fetch` requests across routes.

Expand Down
Loading