Unverified Commit 10cb7406 authored by Shu Ding's avatar Shu Ding Committed by GitHub

(docs) Fixes Server Actions example (#53920)

Closes #53910.
parent fe80aff6
...@@ -459,12 +459,8 @@ function ExampleServerComponent({ id }) { ...@@ -459,12 +459,8 @@ function ExampleServerComponent({ id }) {
'use client' 'use client'
function ExampleClientComponent({ updateItem }) { function ExampleClientComponent({ updateItem }) {
async function action(formData) {
await updateItem(formData)
}
return ( return (
<form action={action}> <form action={updateItem}>
<input type="text" name="name" /> <input type="text" name="name" />
<button type="submit">Update Item</button> <button type="submit">Update Item</button>
</form> </form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment