Skip to content

Commit 9c4bc28

Browse files
authored
Update server-functions.md (#7396)
In the section "Importing Server Functions from Client Components" updated "createNoteAction" to "createNote" to match the function name in the example
1 parent 7b4f948 commit 9c4bc28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/reference/rsc/server-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ export async function createNote() {
8282

8383
```
8484

85-
When the bundler builds the `EmptyNote` Client Component, it will create a reference to the `createNoteAction` function in the bundle. When the `button` is clicked, React will send a request to the server to execute the `createNoteAction` function using the reference provided:
85+
When the bundler builds the `EmptyNote` Client Component, it will create a reference to the `createNote` function in the bundle. When the `button` is clicked, React will send a request to the server to execute the `createNote` function using the reference provided:
8686

8787
```js [[1, 2, "createNote"], [1, 5, "createNote"], [1, 7, "createNote"]]
8888
"use client";
8989
import {createNote} from './actions';
9090

9191
function EmptyNote() {
9292
console.log(createNote);
93-
// {$$typeof: Symbol.for("react.server.reference"), $$id: 'createNoteAction'}
93+
// {$$typeof: Symbol.for("react.server.reference"), $$id: 'createNote'}
9494
<button onClick={() => createNote()} />
9595
}
9696
```

0 commit comments

Comments
 (0)