Home / Learn React / What Is New in React 19
What Is New in React 19
React 19 (and 19.1, 19.2) made common tasks simpler: Actions, use, ref as a prop, context as a provider, document metadata, better errors and new APIs such as Activity.
Theory in plain words
What it is
React 19 is the current major version. It keeps your old code working but adds simpler ways to do forms, data, refs and metadata.
Why we use it
Knowing what is new lets you read tutorials from every year and write less code. Many old patterns such as forwardRef and Context.Provider are no longer needed.
How it works
Most features are small API changes in react and react-dom. A few (Server Components, Server Actions) need a framework or bundler support.
Where it is used
- Reading modern tutorials and codebases
- Migrating from React 18
- Interview questions about "what changed"
| Feature | Before (React 18) | Now |
|---|---|---|
| Form submit | onSubmit + state for loading and errors | <form action={fn}> + useActionState |
| Refs in function components | forwardRef | ref is a normal prop |
| Context provider | <Ctx.Provider value> | <Ctx value> |
| Read a promise | Fetch in useEffect | use(promise) with Suspense |
| Page title and meta | react-helmet or manual DOM code | <title>, <meta>, <link> inside components |
| Ref cleanup | Call with null | Return a cleanup function from the ref callback |
| Custom elements | Partly supported | Full support for props and events |
Metadata in components
Look at the head of this preview with the inspector: the title and meta tags are in <head>.
Activity (19.2)
Activity hides a subtree but keeps its state and pauses its effects, unlike unmounting.
useEffectEvent (19.2)
Effect Events can only be called from inside effects. They are not put in the dependency list.
Quick quiz
1. In React 19 how does a function component get ref?
ref is a prop.
2. How can you provide a context in React 19?
The context itself can be the provider.
3. What does Activity mode="hidden" do?
State is kept, effects are paused.
4. Where do title and meta tags rendered in a component go?
React hoists them to head.
Common questions
In React 19 how does a function component get ref?
As a normal prop. ref is a prop.
How can you provide a context in React 19?
<Ctx value={x}>. The context itself can be the provider.
What does Activity mode="hidden" do?
Hides the UI and keeps its state. State is kept, effects are paused.