Skip to content

Commit b9f5ccf

Browse files
authored
Update react-19-upgrade-guide.md
1 parent 89c94e9 commit b9f5ccf

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

src/content/blog/2024/04/25/react-19-upgrade-guide.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,30 +70,27 @@ We expect most apps will not be affected since the transform is enabled in most
7070
To install the latest version of React and React DOM:
7171

7272
```bash
73-
npm install --save-exact react@rc react-dom@rc
73+
npm install --save-exact react@^19.0.0 react-dom@^19.0.0
7474
```
7575

7676
Or, if you're using Yarn:
7777

7878
```bash
79-
yarn add --exact react@rc react-dom@rc
79+
yarn add --exact react@^19.0.0 react-dom@^19.0.0
8080
```
8181

82-
If you're using TypeScript, you also need to update the types. Once React 19 is released as stable, you can install the types as usual from `@types/react` and `@types/react-dom`. Until the stable release, the types are available in different packages which need to be enforced in your `package.json`:
82+
If you're using TypeScript, you also need to update the types.
83+
```bash
84+
npm install --save-exact @types/react@^19.0.0 react-dom@^19.0.0
85+
```
8386

84-
```json
85-
{
86-
"dependencies": {
87-
"@types/react": "npm:types-react@rc",
88-
"@types/react-dom": "npm:types-react-dom@rc"
89-
},
90-
"overrides": {
91-
"@types/react": "npm:types-react@rc",
92-
"@types/react-dom": "npm:types-react-dom@rc"
93-
}
94-
}
87+
Or, if you're using Yarn:
88+
89+
```bash
90+
yarn add --exact @†ypes/react@^19.0.0 @†ypes/react-dom@^19.0.0
9591
```
9692

93+
9794
We're also including a codemod for the most common replacements. See [TypeScript changes](#typescript-changes) below.
9895

9996
## Codemods {/*codemods*/}

0 commit comments

Comments
 (0)