@ -30,8 +30,8 @@ You can place a "container" element like this `<div>` anywhere inside the `<body
In the HTML page, right before the closing `</body>` tag, add three `<script>` tags for the following files:
In the HTML page, right before the closing `</body>` tag, add three `<script>` tags for the following files:
- [**react.development.js**](https://unpkg.com/react@17/umd/react.development.js) loads the core of React
- [**react.development.js**](https://unpkg.com/react@18/umd/react.development.js) loads the core of React
- [**react-dom.development.js**](https://unpkg.com/react-dom@17/umd/react-dom.development.js) lets React render HTML elements to the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model).
- [**react-dom.development.js**](https://unpkg.com/react-dom@18/umd/react-dom.development.js) lets React render HTML elements to the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model).
- **like_button.js** is where you'll write your component in step 3!
- **like_button.js** is where you'll write your component in step 3!
<Gotcha>
<Gotcha>
@ -42,8 +42,8 @@ When deploying, replace "development.js" with "production.min.js".
@ -116,8 +116,8 @@ Unminified JavaScript can significantly slow down page load times for your users
- **If you already minify** your 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` like so:
- **If you already minify** your 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` like so:
@ -116,8 +116,8 @@ Before deploying your website to production, be mindful that unminified JavaScri
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`:
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`:
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).
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).
Remember that only React files ending with `.production.min.js` are suitable for production.
Remember that only React files ending with `.production.min.js` are suitable for production.
@ -175,7 +175,7 @@ If you haven't yet installed the React DevTools, you can find them here:
> Note
> Note
>
>
> Before React 17, we use the standard [User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API) to profile components with the chrome performance tab.
> Before React 17, we use the standard [User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API) to profile components with the chrome performance tab.
> For a more detailed walkthrough, check out [this article by Ben Schwarz](https://calibreapp.com/blog/react-performance-profiling-optimization).
> For a more detailed walkthrough, check out [this article by Ben Schwarz](https://calibreapp.com/blog/react-performance-profiling-optimization).