remix-v2-forms
Installation
SKILL.md
Remix v2 Forms & Mutations
Canonical mutation primitives for the @remix-run/react@^2 route-module
framework. A correct Remix v2 mutation is: a <Form method="post"> (or
<fetcher.Form>), an action that parses request.formData() and returns
either redirect(...) or json(...), and UI that reads useActionData()
(or fetcher.data) for errors plus useNavigation() (or fetcher.state)
for pending state. Anything that bypasses this loop — fetch(), raw
<form>, e.preventDefault() + client state — silently sacrifices
revalidation, progressive enhancement, and race-safe transitions.
Quick Reference
<Form> + action:
import { json, redirect, type ActionFunctionArgs } from "@remix-run/node";
import { Form, useActionData, useNavigation } from "@remix-run/react";