Skip to content

Commit

Permalink
Nit: server actions can't be passed events (#7175)
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhanlonii authored Sep 19, 2024
1 parent 505c85d commit 39abc60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/reference/rsc/server-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ When React renders the `EmptyNote` Server Component, it will create a reference
export default function Button({onClick}) {
console.log(onClick);
// {$$typeof: Symbol.for("react.server.reference"), $$id: 'createNoteAction'}
return <button onClick={onClick}>Create Empty Note</button>
return <button onClick={() => onClick()}>Create Empty Note</button>
}
```

Expand Down

0 comments on commit 39abc60

Please sign in to comment.