From cf0f0f9375008130ed2da1fea0afc6d737f598b0 Mon Sep 17 00:00:00 2001 From: ramadevsign <50571688+orama254@users.noreply.github.com> Date: Wed, 14 Apr 2021 16:57:40 +0300 Subject: [PATCH 1/7] docs: Fix broken links to React Conf videos (#3629) Co-authored-by: Sebastian Silbermann --- content/community/videos.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/community/videos.md b/content/community/videos.md index a99dc80c7..b59ddfb98 100644 --- a/content/community/videos.md +++ b/content/community/videos.md @@ -13,12 +13,12 @@ Videos dedicated to the discussion of React and the React ecosystem. ### React Conf 2019 {#react-conf-2019} A playlist of videos from React Conf 2019. - + ### React Conf 2018 {#react-conf-2018} A playlist of videos from React Conf 2018. - + ### React.js Conf 2017 {#reactjs-conf-2017} From cde17832a49273a013428a9a33dae21d9c543157 Mon Sep 17 00:00:00 2001 From: ramadevsign <50571688+orama254@users.noreply.github.com> Date: Thu, 15 Apr 2021 11:24:28 +0300 Subject: [PATCH 2/7] docs: Add react learning path on frontend masters link (#3628) Co-authored-by: Sebastian Silbermann --- content/community/courses.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/community/courses.md b/content/community/courses.md index 47883c50a..1a9e66e5a 100644 --- a/content/community/courses.md +++ b/content/community/courses.md @@ -28,7 +28,7 @@ permalink: community/courses.html - [Egghead.io](https://egghead.io/browse/frameworks/react) - Short instructional videos on React and many other topics. -- [Frontend Masters](https://frontendmasters.com/courses/) - Video courses on React and other frontend frameworks. +- [Frontend Masters](https://frontendmasters.com/learn/react/) - Video courses on React. - [Fullstack React](https://www.fullstackreact.com/) - The up-to-date, in-depth, complete guide to React and friends. From 446345cfba91b62546f46f88fad893937a826cdc Mon Sep 17 00:00:00 2001 From: Nancy Heiss <6857695+nancyheiss@users.noreply.github.com> Date: Fri, 16 Apr 2021 13:28:38 -0700 Subject: [PATCH 3/7] fixing typo in tutorial readme (#3639) Co-authored-by: Nancy Heiss --- content/tutorial/tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/tutorial/tutorial.md b/content/tutorial/tutorial.md index 772695181..a79c91584 100644 --- a/content/tutorial/tutorial.md +++ b/content/tutorial/tutorial.md @@ -524,7 +524,7 @@ Note how in `handleClick`, we call `.slice()` to create a copy of the `squares` ### Why Immutability Is Important {#why-immutability-is-important} -In the previous code example, we suggested that you use the `.slice()` method to create a copy of the `squares` array to modify instead of modifying the existing array. We'll now discuss immutability and why immutability is important to learn. +In the previous code example, we suggested that you use the `.slice()` method to create a copy of the `squares` array to copy instead of modifying the existing array. We'll now discuss immutability and why immutability is important to learn. There are generally two approaches to changing data. The first approach is to *mutate* the data by directly changing the data's values. The second approach is to replace the data with a new copy which has the desired changes. From 8e0ed8f8990d58f1b5abe8de74cbf1896295f91e Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Mon, 19 Apr 2021 17:01:37 -0400 Subject: [PATCH 4/7] Removed createBlockingRoot API docs and added a warning note (#3642) --- content/docs/concurrent-mode-adoption.md | 4 ++++ content/docs/concurrent-mode-reference.md | 13 ------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/content/docs/concurrent-mode-adoption.md b/content/docs/concurrent-mode-adoption.md index 720c34c17..f5b8d9db1 100644 --- a/content/docs/concurrent-mode-adoption.md +++ b/content/docs/concurrent-mode-adoption.md @@ -21,6 +21,10 @@ next: concurrent-mode-reference.html > >This documentation is aimed at early adopters and people who are curious. **If you're new to React, don't worry about these features** -- you don't need to learn them right now. +>Caution: +> +>All references below to "blocking mode" and `createBlockingRoot` are outdated and should be ignored. + - [Installation](#installation) diff --git a/content/docs/concurrent-mode-reference.md b/content/docs/concurrent-mode-reference.md index 663af1b3b..e36bb0532 100644 --- a/content/docs/concurrent-mode-reference.md +++ b/content/docs/concurrent-mode-reference.md @@ -28,7 +28,6 @@ This page is an API reference for the React [Concurrent Mode](/docs/concurrent-m - [Enabling Concurrent Mode](#concurrent-mode) - [`createRoot`](#createroot) - - [`createBlockingRoot`](#createblockingroot) - [Suspense](#suspense) - [`Suspense`](#suspensecomponent) - [`SuspenseList`](#suspenselist) @@ -47,18 +46,6 @@ Replaces `ReactDOM.render(, rootNode)` and enables Concurrent Mode. For more information on Concurrent Mode, check out the [Concurrent Mode documentation.](/docs/concurrent-mode-intro.html) -### `createBlockingRoot` {#createblockingroot} - -```js -ReactDOM.createBlockingRoot(rootNode).render() -``` - -Replaces `ReactDOM.render(, rootNode)` and enables [Blocking Mode](/docs/concurrent-mode-adoption.html#migration-step-blocking-mode). - -Opting into Concurrent Mode introduces semantic changes to how React works. This means that you can't use Concurrent Mode in just a few components. Because of this, some apps may not be able to migrate directly to Concurrent Mode. - -Blocking Mode only contains a small subset of Concurrent Mode features and is intended as an intermediary migration step for apps that are unable to migrate directly. - ## Suspense API {#suspense} ### `Suspense` {#suspensecomponent} From 420c3974830052a6e438e75254f4584a56d7c125 Mon Sep 17 00:00:00 2001 From: Bryn Dyment Date: Tue, 20 Apr 2021 16:26:24 +0900 Subject: [PATCH 5/7] =?UTF-8?q?Update=20code-splitting.md=20(setup=20?= =?UTF-8?q?=E2=86=92=20=20set=20up)=20(#3643)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (`setup` is the noun form and `set up` is the verb form.) --- content/docs/code-splitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/code-splitting.md b/content/docs/code-splitting.md index 5d7591cb1..0d1a90b98 100644 --- a/content/docs/code-splitting.md +++ b/content/docs/code-splitting.md @@ -42,7 +42,7 @@ console.log(add(16, 26)); // 42 If you're using [Create React App](https://create-react-app.dev/), [Next.js](https://nextjs.org/), [Gatsby](https://www.gatsbyjs.org/), or a similar tool, you will have a Webpack setup out of the box to bundle your app. -If you aren't, you'll need to setup bundling yourself. For example, see the [Installation](https://webpack.js.org/guides/installation/) and [Getting Started](https://webpack.js.org/guides/getting-started/) guides on the Webpack docs. +If you aren't, you'll need to set up bundling yourself. For example, see the [Installation](https://webpack.js.org/guides/installation/) and [Getting Started](https://webpack.js.org/guides/getting-started/) guides on the Webpack docs. ## Code Splitting {#code-splitting} From 8251eabd38ecc29fca1a890c2381f5663f476f38 Mon Sep 17 00:00:00 2001 From: danield770 Date: Thu, 22 Apr 2021 12:19:27 +0300 Subject: [PATCH 6/7] `lifecycle` -> `lifecycle method` (#3650) --- content/docs/reference-react-component.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/reference-react-component.md b/content/docs/reference-react-component.md index 510a73a2c..a5dabb5d8 100644 --- a/content/docs/reference-react-component.md +++ b/content/docs/reference-react-component.md @@ -299,7 +299,7 @@ Note that this method is fired on *every* render, regardless of the cause. This getSnapshotBeforeUpdate(prevProps, prevState) ``` -`getSnapshotBeforeUpdate()` is invoked right before the most recently rendered output is committed to e.g. the DOM. It enables your component to capture some information from the DOM (e.g. scroll position) before it is potentially changed. Any value returned by this lifecycle will be passed as a parameter to `componentDidUpdate()`. +`getSnapshotBeforeUpdate()` is invoked right before the most recently rendered output is committed to e.g. the DOM. It enables your component to capture some information from the DOM (e.g. scroll position) before it is potentially changed. Any value returned by this lifecycle method will be passed as a parameter to `componentDidUpdate()`. This use case is not common, but it may occur in UIs like a chat thread that need to handle scroll position in a special way. From 5119600cf6f7a5dcbd4d2cc23f6b4ff55d2969b2 Mon Sep 17 00:00:00 2001 From: m019m1 <50258878+m019m1@users.noreply.github.com> Date: Thu, 22 Apr 2021 16:53:02 +0700 Subject: [PATCH 7/7] Include where `setState` is comming from (#3652) Co-authored-by: Sebastian Silbermann --- content/docs/hooks-reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/docs/hooks-reference.md b/content/docs/hooks-reference.md index 1aa14c7f2..1343cc90c 100644 --- a/content/docs/hooks-reference.md +++ b/content/docs/hooks-reference.md @@ -76,6 +76,7 @@ If your update function returns the exact same value as the current state, the s > Unlike the `setState` method found in class components, `useState` does not automatically merge update objects. You can replicate this behavior by combining the function updater form with object spread syntax: > > ```js +> const [state, setState] = useState({}); > setState(prevState => { > // Object.assign would also work > return {...prevState, ...updatedValues};