From a981c357993e2277698ae540c073b3386a9f082c Mon Sep 17 00:00:00 2001 From: Gonzalo Lahoz Date: Fri, 14 Mar 2025 11:56:19 -0300 Subject: [PATCH] Added missing 'use client' directive to client code snippet --- src/content/reference/rsc/use-server.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/reference/rsc/use-server.md b/src/content/reference/rsc/use-server.md index 4d6fb46397a..e6d712e12d4 100644 --- a/src/content/reference/rsc/use-server.md +++ b/src/content/reference/rsc/use-server.md @@ -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';