Next.js Discord

Discord Forum

Client Component Button inside Form with Server action

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
Is it possible to have a client component button in a form that has a server action?

I have a client button that onClick shows a loading state.

Unfortunately it does not work with this button component.
Is there any work around?

2 Replies

Yellow-legged Gull
yes it's possible, i do it myself in my current project. im importing a client submit button in a server component that uses a server action for the form.
Yellow-legged Gull