mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-27 03:08:06 +00:00
Nit: server actions can't be passed events (#7175)
This commit is contained in:
@@ -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>
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user