Skip to content

Commit 16098a4

Browse files
authored
Update form.md
1 parent 4cb0766 commit 16098a4

File tree

1 file changed

+1
-1
lines changed
  • src/content/reference/react-dom/components

1 file changed

+1
-1
lines changed

src/content/reference/react-dom/components/form.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export default function Search() {
279279
Displaying a form submission error message before the JavaScript bundle loads for progressive enhancement requires that:
280280

281281
1. `<form>` be rendered by a [Client Component](/reference/react/use-client)
282-
1. the function passed to the `<form>`'s `action` prop be a [Server Action](/reference/react/use-server)
282+
the function passed to the `<form>`'s `action` prop be a [Server Function](/reference/rsc/server-functions)
283283
1. the `useActionState` Hook be used to display the error message
284284

285285
`useActionState` takes two parameters: a [Server Function](/reference/rsc/server-functions) and an initial state. `useActionState` returns two values, a state variable and an action. The action returned by `useActionState` should be passed to the `action` prop of the form. The state variable returned by `useActionState` can be used to display an error message. The value returned by the Server Function passed to `useActionState` will be used to update the state variable.

0 commit comments

Comments
 (0)