Next.js Server Actions allow you to carry out server-only activities such as data manipulation or handling form submission - without creating separate API endpoints. You can define server actions within Server Components or in a separate server-only
file and call them directly from within your React components, server or client.
References
- nextjs.org. (n.d.). Data Fetching: Server Actions and Mutations | Next.js. [online] Available at: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations.