Part 12 / Topic 2 of 7
<form action={...}> — real progressive enhancement, inspected directly
ReviewForm.tsx renders <form action={formAction}>, where formAction comes from useActionState (section 3). The server-rendered HTML this produces, read directly from a real response, is worth looking at before any hook explanation — because it answers "how does this work with no JavaScript at all?" concretely, not by assertion:
$ curl -s http://localhost:PORT/swiggy-menu/reviews | grep -o '<form.\{0,500\}'
<form class="..." action="" encType="multipart/form-data" method="POST">
<input type="hidden" name="$ACTION_REF_1"/>
<input type="hidden" name="$ACTION_1:0" value="{"id":"60e40c7d408fb39ee2c833086efabff1506e4d3e98","bound":"$@1"}"/>
<input type="hidden" name="$ACTION_1:1" value="[{"errors":{},"values":{"name":"","rating":"5","comment":""}}]"/>
<input type="hidden" name="$ACTION_KEY" value="kebcc840fd3d21dac3868e955de20b29f"/>
...
The form's own action="" attribute is empty — the action it actually invokes is encoded entirely in these hidden fields: $ACTION_REF_1 references the action, $ACTION_1:0 carries the encrypted action id, $ACTION_1:1 carries the current useActionState value (the second argument useActionState binds to the action, serialized), and $ACTION_KEY is a key tying the submission together. This is a real, plain HTML form a browser can submit with zero JavaScript, and it genuinely works that way — proven by constructing the exact same multipart POST with curl, reading the field values straight out of the server-rendered HTML above:
$ curl -s -D - -X POST http://localhost:PORT/swiggy-menu/reviews \
-F '$ACTION_REF_1=' \
-F '$ACTION_1:0={"id":"60e40c7d408fb39ee2c833086efabff1506e4d3e98","bound":"$@1"}' \
-F '$ACTION_1:1=[{"errors":{},"values":{"name":"","rating":"5","comment":""}}]' \
-F '$ACTION_KEY=kebcc840fd3d21dac3868e955de20b29f' \
-F 'name=Rahul' -F 'rating=5' -F 'comment=Best filter coffee in Koramangala, hands down.'
HTTP/1.1 303 See Other
Location: /swiggy-menu/reviews?posted=1
No browser, no JavaScript runtime, no React — a plain curl multipart form submission reached a real Server Action, mutated real server-side state, and got the exact redirect a browser form submission would. This is the installed mutating-data.md guide's own claim, made concrete: "Server Components support progressive enhancement by default, meaning forms that call Server Actions will be submitted even if JavaScript hasn't loaded yet or is disabled." Full file: examples/01-review-form-and-action.tsx (the Client Component) plus examples/02-submit-review-action.ts (the Server Action it calls).
Done here? The practice set for Part 12 — including the solutions — is on the part page.