fix: Invalid URL (404) provided on server actions error (#56323)
Co-authored-by: Zack Tanner <zacktanner@gmail.com>
This commit is contained in:
parent
3172cfedc8
commit
eeb9b3325d
2 changed files with 2 additions and 2 deletions
|
@ -110,7 +110,7 @@ impl<C: Comments> ServerActions<C> {
|
|||
handler
|
||||
.struct_span_err(
|
||||
body.span,
|
||||
"It is not allowed to define inline \"use server\" annotated Server Actions in Client Components.\nTo use Server Actions in a Client Component, you can either export them from a separate file with \"use server\" at the top, or pass them down through props from a Server Component.\n\nRead more: https://nextjs.org/docs/app/api-reference/server-actions#with-client-components\n",
|
||||
"It is not allowed to define inline \"use server\" annotated Server Actions in Client Components.\nTo use Server Actions in a Client Component, you can either export them from a separate file with \"use server\" at the top, or pass them down through props from a Server Component.\n\nRead more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components\n",
|
||||
)
|
||||
.emit()
|
||||
});
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
x It is not allowed to define inline "use server" annotated Server Actions in Client Components.
|
||||
| To use Server Actions in a Client Component, you can either export them from a separate file with "use server" at the top, or pass them down through props from a Server Component.
|
||||
|
|
||||
| Read more: https://nextjs.org/docs/app/api-reference/server-actions#with-client-components
|
||||
| Read more: https://nextjs.org/docs/app/api-reference/functions/server-actions#with-client-components
|
||||
|
|
||||
,-[input.js:3:1]
|
||||
3 | export default function App() {
|
||||
|
|
Loading…
Reference in a new issue