Skip to content

Commit 02d17e4

Browse files
authored
Update more docs to 17 (#3345)
1 parent 64d067f commit 02d17e4

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

content/docs/add-react-to-a-website.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ Next, add three `<script>` tags to the HTML page right before the closing `</bod
5454
5555
<!-- Load React. -->
5656
<!-- Note: when deploying, replace "development.js" with "production.min.js". -->
57-
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
58-
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
57+
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
58+
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
5959
6060
<!-- Load our React component. -->
6161
<script src="like_button.js"></script>
@@ -84,7 +84,7 @@ const domContainer = document.querySelector('#like_button_container');
8484
ReactDOM.render(e(LikeButton), domContainer);
8585
```
8686

87-
These two lines of code find the `<div>` we added to our HTML in the first step, and then display our "Like" button React component inside of it.
87+
These two lines of code find the `<div>` we added to our HTML in the first step, and then display our "Like" button React component inside of it.
8888

8989
### That's It! {#thats-it}
9090

@@ -115,8 +115,8 @@ Before deploying your website to production, be mindful that unminified JavaScri
115115
If you already minify the application scripts, **your site will be production-ready** if you ensure that the deployed HTML loads the versions of React ending in `production.min.js`:
116116

117117
```js
118-
<script src="https://unpkg.com/react@16/umd/react.production.min.js" crossorigin></script>
119-
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js" crossorigin></script>
118+
<script src="https://unpkg.com/react@17/umd/react.production.min.js" crossorigin></script>
119+
<script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js" crossorigin></script>
120120
```
121121

122122
If you don't have a minification step for your scripts, [here's one way to set it up](https://gist.github.com/gaearon/42a2ffa41b8319948f9be4076286e1f3).
@@ -184,7 +184,7 @@ Congratulations! You just added a **production-ready JSX setup** to your project
184184
Create a folder called `src` and run this terminal command:
185185

186186
```
187-
npx babel --watch src --out-dir . --presets react-app/prod
187+
npx babel --watch src --out-dir . --presets react-app/prod
188188
```
189189

190190
>Note

content/docs/cdn-links.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ next: release-channels.html
99
Both React and ReactDOM are available over a CDN.
1010

1111
```html
12-
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
13-
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
12+
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
13+
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
1414
```
1515

1616
The versions above are only meant for development, and are not suitable for production. Minified and optimized production versions of React are available at:
1717

1818
```html
19-
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
20-
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
19+
<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
20+
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
2121
```
2222

23-
To load a specific version of `react` and `react-dom`, replace `16` with the version number.
23+
To load a specific version of `react` and `react-dom`, replace `17` with the version number.
2424

2525
### Why the `crossorigin` Attribute? {#why-the-crossorigin-attribute}
2626

content/docs/optimizing-performance.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Remember that this is only necessary before deploying to production. For normal
4343
We offer production-ready versions of React and React DOM as single files:
4444

4545
```html
46-
<script src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
47-
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
46+
<script src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
47+
<script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
4848
```
4949

5050
Remember that only React files ending with `.production.min.js` are suitable for production.
@@ -75,10 +75,10 @@ For the most efficient Browserify production build, install a few plugins:
7575

7676
```
7777
# If you use npm
78-
npm install --save-dev envify terser uglifyify
78+
npm install --save-dev envify terser uglifyify
7979
8080
# If you use Yarn
81-
yarn add --dev envify terser uglifyify
81+
yarn add --dev envify terser uglifyify
8282
```
8383

8484
To create a production build, make sure that you add these transforms **(the order matters)**:
@@ -379,7 +379,7 @@ function updateColorMap(colormap) {
379379
}
380380
```
381381

382-
This feature was added to JavaScript in ES2018.
382+
This feature was added to JavaScript in ES2018.
383383

384384
If you're using Create React App, both `Object.assign` and the object spread syntax are available by default.
385385

static/html/single-file-example.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<head>
44
<meta charset="UTF-8" />
55
<title>Hello World</title>
6-
<script src="https://unpkg.com/react@16/umd/react.development.js"></script>
7-
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
8-
6+
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
7+
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
8+
99
<!-- Don't use this in production: -->
1010
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
1111
</head>

0 commit comments

Comments
 (0)