Unverified Commit 75975dd5 authored by Willem-Jaap's avatar Willem-Jaap Committed by GitHub

docs: Fix incorrect prop name in client component (#58591)

`updateItem` is the name of the action, not the passed prop. The correct
property name is `myAction`.
parent caa05b47
...@@ -76,9 +76,9 @@ In some cases, you might want to pass down a Server Action to a Client Component ...@@ -76,9 +76,9 @@ In some cases, you might want to pass down a Server Action to a Client Component
```jsx filename="app/client-component.jsx" ```jsx filename="app/client-component.jsx"
'use client' 'use client'
export default function ClientComponent({ updateItem }) { export default function ClientComponent({ myAction }) {
return ( return (
<form action={updateItem}> <form action={myAction}>
<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