Loading lesson path
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.
To install the latest version, from your project folder run the following from the terminal:
Formula
npm i react@latest react - dom@latestIn 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(
Formula
< h1 > Hello React!</h1 >, document.getElementById('root'));// After import { createRoot } from 'react-dom/client';createRoot(document.getElementById('root')).render(
Formula
< 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.