Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: fix button server action example #70131

Merged
merged 2 commits into from
Sep 16, 2024
Merged

docs: fix button server action example #70131

merged 2 commits into from
Sep 16, 2024

Conversation

nattui
Copy link
Contributor

@nattui nattui commented Sep 15, 2024

When following the example for server actions for button onClick, developers will see the error below.

Error: Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.

That is because the server action function is taking in the button onClick event in the action.

@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Sep 15, 2024
@nattui nattui changed the title update button server action example docs: update button server action example Sep 15, 2024
@nattui nattui changed the title docs: update button server action example docs: fix button server action example Sep 15, 2024
@ijjk ijjk enabled auto-merge (squash) September 16, 2024 19:01
@ijjk ijjk merged commit 9e15451 into vercel:canary Sep 16, 2024
38 checks passed
@github-actions github-actions bot added the locked label Oct 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Documentation Related to Next.js' official documentation. locked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants