bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/React/React Core
React•React Core

Upgrade React

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind Upgrade React?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ i react@latest react-dom@latest
3Order

Put the learning moves in the order that makes the concept easiest to apply.

Step 2: Use the new root API
Step 1: Install React 19
Upgrade to React 19

Upgrade to React 19

Upgrading an existing React application to version 19 only requires two steps.

If you are already using the latest version of React, you can skip this section.

Step 1: Install React 19

To install the latest version, from your project folder run the following from the terminal:

npm i react@latest react-dom@latest

Step 2: Use the new root API

In order to take advantage of React 19's concurrent features you'll need to use the new root API for client rendering.

// Before import ReactDOM from 'react-dom';
ReactDOM.render( <h1>Hello React!</h1>, document.getElementById('root') );
// After import { createRoot } from 'react-dom/client';
createRoot(document.getElementById('root')).render( <h1>Hello React!</h1> );

Your application will work without using the new root API. If you continue to use ReactDOM.render your application will behave like React 17.

Previous

React Render HTML

Next

React ES6