





















































Hi ,
Before we jump in, THANK YOU ! Every click, reply, and bit of feedback over the past 99 issues helped us build WebDevPro into what it is today. We’re incredibly proud to bring you issue #100. 🎯
To mark the milestone, we’re diving into a topic that reflects the kind of shift we love covering: quietly released, deeply impactful, and immediately relevant.
React has evolved a lot over the years, but form handling? It’s long been a source of friction, even for seasoned developers. You needed boilerplate, custom handlers, and third-party libraries just to submit a form.
React 19 changes that.
To unpack one of its most impactful updates, we sat down with Daniel Bugl, React community contributor and author of Learn React Hooks. His book explores hook-based development in React 18 and 19, and in this special edition, Daniel offers a deep dive into Form Actions, a new feature that brings native simplicity to form submission. With hands-on insights from his work across startups, public sector platforms, and his own company TouchLay, he shows how React 19 is shifting the landscape for frontend developers.
In this article, you’ll specifically learn:
Before you jump in, here are some highlights from our recent WebDevPro coverage:
Now let's get straight to the good stuff!
Cheers!
Your editor-in-chief,
Kinnari Chohan
Advertise with us
Interested in reaching our audience? Reply to this email or write to kinnaric@packt.com.
Learn more about our sponsorship opportunities here.
Daniel Bugl is a full-stack developer, product designer, and entrepreneur focusing on web technologies. He has a Bachelor of Science degree in business informatics and information systems and a Master of Science degree in data science from the Vienna University of Technology (TU Wien). He is a contributor to many open source projects and a member of the React community.
He also founded and runs his own hardware/software start-up, TouchLay, which helps other companies present their products and services. At his company, he constantly works with web technologies, particularly making use of React and Next.js.
In the past couple of years, he has worked as a technical advisor and full-stack developer for large enterprises and the public sector, among other things working on citizen services for the Austrian government.
Up until now, crafting a reliable form in React meant cobbling together multiple moving parts. Loading indicators. Error states. Async logic. Validation rules. Libraries like Formik and React Hook Form promised to help, but came at the cost of extra weight and complexity.
The problem wasn’t just technical; it was philosophical. Building a form shouldn’t feel like spinning up a mini state machine.
React 19 introduces Form Actions, a fresh, built-in mechanism that makes form submissions not just manageable, but almost effortless. Instead of inventing a new model, Form Actions extends the standards that browsers have supported for years, combining them with React’s declarative philosophy.
The result is a native-feeling form experience that removes the need for custom onSubmit handlers, spinners, or manually tracked errors.
Let’s break down what developers gain by using Form Actions:
Here's a simple ContactForm component using useActionState -- React 19's hook for handling form actions:
import { useActionState } from 'react';
function ContactForm() {
const [state, submitAction, isPending] = useActionState(
async (prevState, formData) => {
try {
const response = await fetch('/api/contact', {
method: 'POST',
body: formData,
});
if (!response.ok) {
throw new Error('Failed to submit form');
}
return { success: true, message: 'Form submitted successfully!' };
} catch (error) {
return { success: false, error: error.message };
}
},
{ success: false, message: '' }
);
return (
<form action={submitAction}>
<input name="email" type="email" required />
<textarea name="message" required />
<button type="submit" disabled={isPending}>
{isPending ? 'Submitting...' : 'Submit'}
</button>
{state.success && <p style={{ color: 'green' }}>{state.message}</p>}
{state.error && <p style={{ color: 'red' }}>Error: {state.error}</p>}
</form>
);
}
What used to demand state hooks, custom handlers, and error tracking now fits cleanly into a single hook pattern. The behavior stays predictable, and the code remains focused.
The useActionState hook is the engine behind the simplicity. It accepts two key inputs:
Its return includes:
It’s not magic, it’s just better design.
Under the hood, React 19 uses the standard FormData API. This means your form data integrates smoothly with fetch() and server APIs. It’s iterable, lightweight, and supports native browser behaviors without needing a JSON transformation step.
Want to learn more? Here’s the MDN reference for FormData.
React 19’s Form Actions offer a compelling default for handling simple to moderately complex forms, especially those with linear input flows, basic validation, and limited state dependencies. For many use cases, that’s more than enough.
But there are still valid reasons to reach for a library:
React 19 narrows the gap significantly, but doesn't aim to replace every form tool. Instead, it raises the baseline, giving you a built-in option that handles the fundamentals exceptionally well. You may still choose external libraries, but now, it's a deliberate choice rather than a necessity.
The addition of Form Actions in React 19 is more than a convenience feature: it signals a broader shift in how React aligns with the platform.
In earlier versions, React often abstracted away browser behavior: it replaced native form mechanics with its own event system, encouraged state-driven rendering over traditional form submissions, and nudged developers toward controlled inputs. While powerful, this approach also created friction, especially for developers working closely with web APIs or server-side logic.
Form Actions mark a shift in the opposite direction. React now leverages:
By embracing standards and minimizing the need for scaffolding, React is moving closer to a model where simple things are truly simple, and complexity is opt-in, not baked in.
For developers, this means:
React 19 doesn’t remove flexibility. It just gives you a stronger default. And that’s exactly what modern frontend development needs: guardrails that don’t get in your way.
Want to dig further into React 19 and its new hooks pattern? Learn React Hooks by Daniel Bugl walks through this and more, covering everything from useEffect fundamentals to advanced composable logic.
This change in form handling is more than just a new feature; it’s a sign that React is growing up. And for developers, that means less scaffolding and more building.