Build a contact form with Remix actions
Use Remix's native `action` export to handle contact form submissions server-side.
- 1
Export an action function
In your route file, export an `action` that reads `formData` and POSTs to FormLoom.
- 2
Use useActionData
Call `useActionData()` in the component to read the action's result and show success/error.
- 3
Add progressive enhancement
Remix forms work without JS by default — they fall back to a full-page POST if JS is disabled.
FAQ
It works, but posting via a Remix action keeps the key server-side and allows server-side validation.