Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
10cb7406
Unverified
Commit
10cb7406
authored
Aug 11, 2023
by
Shu Ding
Committed by
GitHub
Aug 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(docs) Fixes Server Actions example (#53920)
Closes #53910.
parent
fe80aff6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
03-server-actions.mdx
...g-your-application/02-data-fetching/03-server-actions.mdx
+1
-5
No files found.
docs/02-app/01-building-your-application/02-data-fetching/03-server-actions.mdx
View file @
10cb7406
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment