Error: Functions cannot be passed directly to Client Components unless you explicitly expose it by marking it with "use server". Or maybe you meant to call this function rather than return it. #69870
Unanswered
abusayed0
asked this question in
App Router
Replies: 1 comment 3 replies
-
|
Here: //index.js
export const handleSubmit = async(formData) => {
console.log(formData.get("name"));
}You need to add a //index.js
'use server'
export const handleSubmit = async(formData) => {
console.log(formData.get("name"));
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Could you please explain the error? I found it misleading because, in my code, I do not use any client component.
Beta Was this translation helpful? Give feedback.
All reactions