Skip to content
Open
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion src/content/reference/rsc/use-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ Server Functions are exposed server endpoints and can be called anywhere in clie

When using a Server Function outside a [form](/reference/react-dom/components/form), call the Server Function in a [Transition](/reference/react/useTransition), which allows you to display a loading indicator, show [optimistic state updates](/reference/react/useOptimistic), and handle unexpected errors. Forms will automatically wrap Server Functions in transitions.

```js {9-12}
```js {11-14}
'use client';

import incrementLike from './actions';
import { useState, useTransition } from 'react';

Expand Down