From bc39165e4ef54aba08d7023dc07e9e5940cfe5bf Mon Sep 17 00:00:00 2001 From: Aleksandr Kiliushin <aleksandr.kiliushin@gmail.com> Date: Mon, 14 Nov 2022 15:53:32 +0400 Subject: [PATCH] docs: Fix a broken link, add a missing quote (#5260) --- beta/src/content/apis/react/Children.md | 2 +- beta/src/content/apis/react/useState.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beta/src/content/apis/react/Children.md b/beta/src/content/apis/react/Children.md index fc70dc6b..a4f7772f 100644 --- a/beta/src/content/apis/react/Children.md +++ b/beta/src/content/apis/react/Children.md @@ -49,7 +49,7 @@ function RowList({ children }) { } ``` -In the example above, the `RowList` wraps every child it receives into a `<div className="Row>` container. For example, let's say the parent component passes three `<p>` tags as the `children` prop to `RowList`: +In the example above, the `RowList` wraps every child it receives into a `<div className="Row">` container. For example, let's say the parent component passes three `<p>` tags as the `children` prop to `RowList`: ```js <RowList> diff --git a/beta/src/content/apis/react/useState.md b/beta/src/content/apis/react/useState.md index ece3044a..7a7df1d2 100644 --- a/beta/src/content/apis/react/useState.md +++ b/beta/src/content/apis/react/useState.md @@ -1134,7 +1134,7 @@ function handleClick() { * If the new value you provide is identical to the current `state`, as determined by an [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is) comparison, React will **skip re-rendering the component and its children.** This is an optimization. Although in some cases React may still need to call your component before skipping the children, it shouldn't affect your code. -* React [batches state updates.](/learn/queueing-a-series-of-state-updates) It updates the screen **after all the event handlers have run** and have called their `set` functions. This prevents multiple re-renders during a single event. In the rare case that you need to force React to update the screen earlier, for example to access the DOM, you can use [`flushSync`.](/apis/react-dom/flushsync) +* React [batches state updates.](/learn/queueing-a-series-of-state-updates) It updates the screen **after all the event handlers have run** and have called their `set` functions. This prevents multiple re-renders during a single event. In the rare case that you need to force React to update the screen earlier, for example to access the DOM, you can use [`flushSync`.](/apis/react-dom/flushSync) * Calling the `set` function *during rendering* is only allowed from within the currently rendering component. React will discard its output and immediately attempt to render it again with the new state. This pattern is rarely needed, but you can use it to **store information from the previous renders**. [See an example above.](#storing-information-from-previous-renders)