Forms that work before JS lands
A form with action={serverAction} works as a native HTML POST before any JavaScript runs. When JS hydrates, it enhances submission to be no-refresh. If JS fails entirely, the form still works.
Three layers, top down
| Layer | Behavior |
|---|---|
| HTML only | Native POST → server processes → full reload to the rendered result. |
| + JS | Submission via fetch, no reload, layout state preserved. |
| + React | Optimistic UI, pending states, transitions. |
Why this is a real win
Slow networks, old browsers, JS errors, ad-blockers that nuke the framework — the form keeps working. Server Actions buy you progressive enhancement that traditional React + custom fetch() never had.