> ## Content Index
> Fetch the complete content index at: https://reactpractice.dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# Use React 19 form features to refactor a Newsletter Subscribe form
- URL: https://reactpractice.dev/exercise/use-react-19-form-features-to-refactor-a-newsletter-subscribe-form/
- Published: 2024-12-18T07:23:30.000Z
- Updated: 2026-06-01T01:57:12.000Z
- Author: Corina Udrescu
- Tags: React 19, #corina-2, Exercises, #Import 2026-06-09 12:07

React 19 brings a lot of new improvements to how we use forms.  
Practice using the new `useActionState` hook by refactoring a "Newsletter Subscribe" form. You'd be surprised how much code you end up removing!

Fork the CodeSandbox and try it out:  
[https://codesandbox.io/p/sandbox/pxxhp3](https://codesandbox.io/p/sandbox/pxxhp3?ref=reactpractice.dev)

Here are a few things to pay attention to:

- how do you now submit the form?
- how do you handle the error and success states?
- how do you clear the form values after a successful submission?

Did you notice any difference? What's your favourite part about the new approach?  
When you're ready to check your work, take a look at [this article](https://reactpractice.dev/articles/building-a-simple-form-in-react-before-and-after-react-19/), highlighting all the new features.

![](https://storage.ghost.io/c/7c/fc/7cfc444f-a1c9-4dd3-a87e-8dcc2f1180be/content/images/2024/12/1-subscribe-box-1.png)