terrarium
All posts
React1 min read0 reactionsSep 18, 2026

React 19 Actions in practice

Form mutations without boilerplate: useActionState, useFormStatus and optimistic updates.

React 19 Actions in practice

React 19's actions turn form submissions into first-class async transitions. Instead of wiring up onSubmit handlers, isPending states and error boundaries by hand, an action gives you all of that in one place.

useActionState binds a mutation to form state, useFormStatus exposes pending state to child components, and useOptimistic lets the UI update before the server confirms. Together they remove most of the plumbing code a typical mutation needed.

The mental shift: mutations are transitions, not events. Once you model them that way, pending UI, rollbacks and retries fall out naturally.

What's your reaction to this post?

Comments (0)

Comments are published after admin approval.

No comments yet. Be the first to comment!