Server and Client Components in actions #66295
Unanswered
Abyssinian posted this in #help-forum
AbyssinianOP
I'm trying to understand if it's feasible to use actions to return components instead of data in Next.js.
My goal is for the client to receive a component from an action, rather than just data.
Here's what I've found so far:
Using fully server-side components makes this possible.
As soon as I add client components, I encounter errors. It appears that client components returned from actions are not being added to the manifest, likely by design.
I'm wondering if this approach is considered an anti-pattern and should be avoided, or if there's is/will be way to configure actions to send client components.
Thank you
https://github.com/vercel/next.js/discussions/66295
My goal is for the client to receive a component from an action, rather than just data.
Here's what I've found so far:
Using fully server-side components makes this possible.
As soon as I add client components, I encounter errors. It appears that client components returned from actions are not being added to the manifest, likely by design.
I'm wondering if this approach is considered an anti-pattern and should be avoided, or if there's is/will be way to configure actions to send client components.
Thank you
https://github.com/vercel/next.js/discussions/66295