Unverified Commit 755c8d90 authored by rocketman's avatar rocketman Committed by GitHub

docs: Make server actions `maxDuration` timeout more clear (#60005)

Co-authored-by: 's avatarLee Robinson <me@leerob.io>
parent d942d96a
......@@ -120,6 +120,7 @@ export default function ClientComponent({ updateItem }) {
- The arguments and return value of Server Actions must be serializable by React. See the React docs for a list of [serializable arguments and values](https://react.dev/reference/react/use-server#serializable-parameters-and-return-values).
- Server Actions are functions. This means they can be reused anywhere in your application.
- Server Actions inherit the [runtime](/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes) from the page or layout they are used on.
- Server Actions inherit the [Route Segment Config](docs/app/api-reference/file-conventions/route-segment-config) from the page or layout they are used on, including fields like `maxDuration`.
## Examples
......
......@@ -214,6 +214,10 @@ export const maxDuration = 5
export const maxDuration = 5
```
> **Good to know**:
>
> - If using [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations), set the `maxDuration` at the page level to change the default timeout of all Server Actions used on the page.
### `generateStaticParams`
The `generateStaticParams` function can be used in combination with [dynamic route segments](/docs/app/building-your-application/routing/dynamic-routes) to define the list of route segment parameters that will be statically generated at build time instead of on-demand at request time.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment