diff --git a/src/content/reference/rsc/server-functions.md b/src/content/reference/rsc/server-functions.md index 2603c109926..a40a8aba7f5 100644 --- a/src/content/reference/rsc/server-functions.md +++ b/src/content/reference/rsc/server-functions.md @@ -157,14 +157,23 @@ You can pass a Server Function to a Form to automatically submit the form to the ```js [[1, 3, "updateName"], [1, 7, "updateName"]] "use client"; -import {updateName} from './actions'; +import { useState } from "react"; +import { updateName } from "./actions"; function UpdateName() { + const [name, setName] = useState(""); + return (
- ) + ); } ```