Unverified Commit 87c4d177 authored by Dusan Ralic's avatar Dusan Ralic Committed by GitHub

Update upgrading.md (#31173)

Include required steps for the latest React and Next.js version upgrade via npm/yarn.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
parent 9fe0fda5
......@@ -10,6 +10,34 @@ description: Learn how to upgrade Next.js.
The minimum Node.js version has been bumped from 12.0.0 to 12.22.0 which is the first version of Node.js with native ES Modules support.
### Upgrade React version to latest
To upgrade you can run the following command:
```
npm install react@latest react-dom@latest
```
Or using `yarn`:
```
yarn add react@latest react-dom@latest
```
### Upgrade Next.js version to 12
To upgrade you can run the following command in the terminal:
```
npm install next@12
```
or
```
yarn add next@12
```
### SWC replacing Babel
Next.js now uses Rust-based compiler [SWC](https://swc.rs/) to compile JavaScript/TypeScript. This new compiler is up to 17x faster than Babel when compiling individual files and up to 5x faster Fast Refresh.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment