Calling an action directly from a server component #298
Unanswered
josiahwiebe
asked this question in
Q&A
Replies: 1 comment
-
It used to work in Next.js 14 for me, but now I'm seeing type errors in 15.1. Is there no better way? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
All of the examples illustrate how you can call actions from a client component, but when you try to call an action in a server component, you get a type error.
This won't work in a server component:
but this will work:
Feels like a bit of an odd workaround to me.
Beta Was this translation helpful? Give feedback.
All reactions