Server Actions
Forms that call
"use server" functions directly. No API routes, no manual fetch. The server automatically re-renders the page.Guestbook
Sistema—Bienvenido al guestbook de opennext!6:46:01 PM
What does this show?
- ‣
"use server"turns functions into automatic endpoints - ‣Forms use
action={serverFunction}without manual JavaScript - ‣After executing the action, the page re-renders with fresh data
- ‣Works with progressive enhancement (also without client JS)
- ‣Logs appear in the server terminal, not the browser