Skip to content

Commit a981c35

Browse files
committed
Added missing 'use client' directive to client code snippet
1 parent ab18d2f commit a981c35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/content/reference/rsc/use-server.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ Server Functions are exposed server endpoints and can be called anywhere in clie
179179

180180
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.
181181

182-
```js {9-12}
182+
```js {11-14}
183+
'use client';
184+
183185
import incrementLike from './actions';
184186
import { useState, useTransition } from 'react';
185187

0 commit comments

Comments
 (0)