Next.js Discord

Discord Forum

Inline server action not called

Answered
Matt posted this in #help-forum
Open in Discord
Just a quick one- I'm sure I'm doing something stupid here.

When clicking the button, nothing is logged by Next. I have server actions working in separate files and using forms, but tried to emulate the NextConf slide and not getting anywhere.
Answered by joulev
is it wrapped inside a <form>? if not, try wrapping it inside a <form>
View full answer

3 Replies

Answer
i think i faced the exact problem just a few minutes ago
That was literally it. I'm guessing the next conf slide demo (which wasn't wrapped) had the component itself nested in a form elsewhere