Pass your Server Action straight to a <form action={...}> prop. When the user submits the form, Next.js sends a FormData object to your server function—and it even works gracefully if JavaScript hasn't finished loading yet.
ADVERTISEMENT
We use cookies to collect and analyse information on site performance and usage, and to enhance and customise content and advertisements. Learn more
Required for basic website functionality.
Help us understand how visitors interact with the site.
Used to show relevant ads and measure ad performance.