From a5069837be74460fccf399d357c756d9c173283a Mon Sep 17 00:00:00 2001
From: Igor Shevchenko <39371503+bnzone@users.noreply.github.com>
Date: Mon, 30 Sep 2024 11:00:08 -0500
Subject: [PATCH 02/20] chore(docs): fix typo (#7194)
---
src/content/reference/react-dom/preinitModule.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/reference/react-dom/preinitModule.md b/src/content/reference/react-dom/preinitModule.md
index 996c5a2e..5f9be6d5 100644
--- a/src/content/reference/react-dom/preinitModule.md
+++ b/src/content/reference/react-dom/preinitModule.md
@@ -51,7 +51,7 @@ The `preinitModule` function provides the browser with a hint that it should sta
#### Parameters {/*parameters*/}
-* `href`: a string. The URL of the module you want to download and exeucute.
+* `href`: a string. The URL of the module you want to download and execute.
* `options`: an object. It contains the following properties:
* `as`: a required string. It must be `'script'`.
* `crossOrigin`: a string. The [CORS policy](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to use. Its possible values are `anonymous` and `use-credentials`.
From 8a62ce3a12a99bdc4967150b5e18e59cd3aa82c1 Mon Sep 17 00:00:00 2001
From: Prem Singh <134128887+premdood@users.noreply.github.com>
Date: Mon, 30 Sep 2024 21:30:38 +0530
Subject: [PATCH 03/20] Add files via upload (#7182)
---
src/content/learn/synchronizing-with-effects.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/learn/synchronizing-with-effects.md b/src/content/learn/synchronizing-with-effects.md
index 48e99cc2..11507516 100644
--- a/src/content/learn/synchronizing-with-effects.md
+++ b/src/content/learn/synchronizing-with-effects.md
@@ -627,7 +627,7 @@ See the examples below for how to handle common patterns.
### Controlling non-React widgets {/*controlling-non-react-widgets*/}
-Sometimes you need to add UI widgets that aren't written to React. For example, let's say you're adding a map component to your page. It has a `setZoomLevel()` method, and you'd like to keep the zoom level in sync with a `zoomLevel` state variable in your React code. Your Effect would look similar to this:
+Sometimes you need to add UI widgets that aren't written in React. For example, let's say you're adding a map component to your page. It has a `setZoomLevel()` method, and you'd like to keep the zoom level in sync with a `zoomLevel` state variable in your React code. Your Effect would look similar to this:
```js
useEffect(() => {
From ae9726a8532b99ed4a2c40946dfa96a82f8a12ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rado=C5=A1=20Mili=C4=87ev?=
<40705899+rammba@users.noreply.github.com>
Date: Mon, 30 Sep 2024 18:07:07 +0200
Subject: [PATCH 04/20] Docs: Fix typos in thinking-in-react.md (#7179)
* Fix typos in thinking-in-react.md
* Update src/content/learn/thinking-in-react.md
---------
Co-authored-by: Ricky
---
src/content/learn/thinking-in-react.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/content/learn/thinking-in-react.md b/src/content/learn/thinking-in-react.md
index 0f05a056..822891e6 100644
--- a/src/content/learn/thinking-in-react.md
+++ b/src/content/learn/thinking-in-react.md
@@ -268,8 +268,8 @@ Now let's run through our strategy for them:
1. **Identify components that use state:**
* `ProductTable` needs to filter the product list based on that state (search text and checkbox value).
* `SearchBar` needs to display that state (search text and checkbox value).
-1. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
-2. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
+2. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
+3. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
So the state values will live in `FilterableProductTable`.
From 6d2f3373d178a4f00b50ae201f0f2855cb468906 Mon Sep 17 00:00:00 2001
From: Mo Javad <34189022+mojavad@users.noreply.github.com>
Date: Mon, 30 Sep 2024 17:21:44 +0100
Subject: [PATCH 05/20] Add React Native London Conf to the community
conferences (#7173)
---
src/content/community/conferences.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md
index 297294db..aaa76121 100644
--- a/src/content/community/conferences.md
+++ b/src/content/community/conferences.md
@@ -45,6 +45,11 @@ October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
+### React Native London Conf 2024 {/*react-native-london-2024*/}
+November 14 & 15, 2024. In-person in London, UK
+
+[Website](https://reactnativelondon.co.uk/) - [Twitter](https://x.com/RNLConf)
+
### React Summit US 2024 {/*react-summit-us-2024*/}
November 19 & 22, 2024. In-person in New York, USA + online (hybrid event)
From d418485aedb956bb98ea6f39afc769d10c82e625 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Parth=20=E2=80=A2=20imParth?=
<108121667+imparth7@users.noreply.github.com>
Date: Mon, 30 Sep 2024 21:55:38 +0530
Subject: [PATCH 06/20] fix:#7158 issue (#7159)
---
src/utils/rss.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/utils/rss.js b/src/utils/rss.js
index c6fb8241..29e5511e 100644
--- a/src/utils/rss.js
+++ b/src/utils/rss.js
@@ -40,7 +40,7 @@ exports.generateRssFeed = function () {
const files = filesByOldest.reverse();
for (const filePath of files) {
- const id = filePath.split('/').slice(-1).join('');
+ const id = path.basename(filePath);
if (id !== 'index.md') {
const content = fs.readFileSync(filePath, 'utf-8');
const {data} = matter(content);
From c7392cbcc1d7dcefccd649b6485a5775271bded8 Mon Sep 17 00:00:00 2001
From: Reg Chiu
Date: Tue, 1 Oct 2024 00:54:54 +0800
Subject: [PATCH 07/20] docs(act.md): correct ReactDOM to ReactDOMClient
(#7156)
* docs(act.md): correct ReactDOMClient to ReactDOM
* docs(act.md): switch the import to ReactDOMClient instead
---
src/content/reference/react/act.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/content/reference/react/act.md b/src/content/reference/react/act.md
index 256befa3..c01f3cd6 100644
--- a/src/content/reference/react/act.md
+++ b/src/content/reference/react/act.md
@@ -90,7 +90,7 @@ To test the render output of a component, wrap the render inside `act()`:
```js {10,12}
import {act} from 'react';
-import ReactDOM from 'react-dom/client';
+import ReactDOMClient from 'react-dom/client';
import Counter from './Counter';
it('can render and update a counter', async () => {
@@ -99,7 +99,7 @@ it('can render and update a counter', async () => {
// ✅ Render the component inside act().
await act(() => {
- ReactDOM.createRoot(container).render();
+ ReactDOMClient.createRoot(container).render();
});
const button = container.querySelector('button');
@@ -119,7 +119,7 @@ To test events, wrap the event dispatch inside `act()`:
```js {14,16}
import {act} from 'react';
-import ReactDOM from 'react-dom/client';
+import ReactDOMClient from 'react-dom/client';
import Counter from './Counter';
it.only('can render and update a counter', async () => {
@@ -174,4 +174,4 @@ global.IS_REACT_ACT_ENVIRONMENT=true
In testing frameworks like [React Testing Library](https://testing-library.com/docs/react-testing-library/intro), `IS_REACT_ACT_ENVIRONMENT` is already set for you.
-
\ No newline at end of file
+
From 44364225ac337d84ecc62b8e8150d0c5c859cda5 Mon Sep 17 00:00:00 2001
From: Steven SAN <49305087+ssan93@users.noreply.github.com>
Date: Tue, 1 Oct 2024 02:05:12 +0900
Subject: [PATCH 08/20] chore(typo): Fix comment to match code (#7147)
Co-authored-by: san.s
---
src/components/MDX/Sandpack/Preview.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/MDX/Sandpack/Preview.tsx b/src/components/MDX/Sandpack/Preview.tsx
index 9669e5f4..7d7cdc5a 100644
--- a/src/components/MDX/Sandpack/Preview.tsx
+++ b/src/components/MDX/Sandpack/Preview.tsx
@@ -113,7 +113,7 @@ export function Preview({
/**
* The spinner component transition might be longer than
* the bundler loading, so we only show the spinner if
- * it takes more than 1s to load the bundler.
+ * it takes more than 500s to load the bundler.
*/
timeout = setTimeout(() => {
setShowLoading(true);
From 7a8e256c898efec62914222ccf38ba4c3a6c560e Mon Sep 17 00:00:00 2001
From: Faris P
Date: Mon, 30 Sep 2024 22:39:24 +0530
Subject: [PATCH 09/20] Fix minor grammar issue in tutorial-tic-tac-toe.md (`a`
to `an`) (#7136)
---
src/content/learn/tutorial-tic-tac-toe.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/learn/tutorial-tic-tac-toe.md b/src/content/learn/tutorial-tic-tac-toe.md
index f18ec493..6487e800 100644
--- a/src/content/learn/tutorial-tic-tac-toe.md
+++ b/src/content/learn/tutorial-tic-tac-toe.md
@@ -1133,7 +1133,7 @@ Calling the `setSquares` function lets React know the state of the component has
-JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) which means an inner function (e.g. `handleClick`) has access to variables and functions defined in a outer function (e.g. `Board`). The `handleClick` function can read the `squares` state and call the `setSquares` method because they are both defined inside of the `Board` function.
+JavaScript supports [closures](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) which means an inner function (e.g. `handleClick`) has access to variables and functions defined in an outer function (e.g. `Board`). The `handleClick` function can read the `squares` state and call the `setSquares` method because they are both defined inside of the `Board` function.
From 4fe9c85bc0a9296e1ec152210bc4446d026626c7 Mon Sep 17 00:00:00 2001
From: youngvform
Date: Tue, 1 Oct 2024 02:12:09 +0900
Subject: [PATCH 10/20] remove wrong reference of window (#7132)
---
.../reference/rules/components-and-hooks-must-be-pure.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/reference/rules/components-and-hooks-must-be-pure.md b/src/content/reference/rules/components-and-hooks-must-be-pure.md
index 733597c6..9da65d04 100644
--- a/src/content/reference/rules/components-and-hooks-must-be-pure.md
+++ b/src/content/reference/rules/components-and-hooks-must-be-pure.md
@@ -190,7 +190,7 @@ Side effects that are directly visible to the user are not allowed in the render
```js {2}
function ProductDetailPage({ product }) {
- document.window.title = product.title; // 🔴 Bad: Changes the DOM
+ document.title = product.title; // 🔴 Bad: Changes the DOM
}
```
From 8fee25f4ec2bf87749ad82ae1f6b7ed4d0e8b138 Mon Sep 17 00:00:00 2001
From: Muhammad Saqib
Date: Mon, 30 Sep 2024 22:14:50 +0500
Subject: [PATCH 11/20] Update renderToPipeableStream.md (#7131)
---
.../reference/react-dom/server/renderToPipeableStream.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/content/reference/react-dom/server/renderToPipeableStream.md b/src/content/reference/react-dom/server/renderToPipeableStream.md
index 20a5960e..7d0d1ab3 100644
--- a/src/content/reference/react-dom/server/renderToPipeableStream.md
+++ b/src/content/reference/react-dom/server/renderToPipeableStream.md
@@ -57,7 +57,7 @@ On the client, call [`hydrateRoot`](/reference/react-dom/client/hydrateRoot) to
* **optional** `nonce`: A [`nonce`](http://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#nonce) string to allow scripts for [`script-src` Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src).
* **optional** `onAllReady`: A callback that fires when all rendering is complete, including both the [shell](#specifying-what-goes-into-the-shell) and all additional [content.](#streaming-more-content-as-it-loads) You can use this instead of `onShellReady` [for crawlers and static generation.](#waiting-for-all-content-to-load-for-crawlers-and-static-generation) If you start streaming here, you won't get any progressive loading. The stream will contain the final HTML.
* **optional** `onError`: A callback that fires whenever there is a server error, whether [recoverable](#recovering-from-errors-outside-the-shell) or [not.](#recovering-from-errors-inside-the-shell) By default, this only calls `console.error`. If you override it to [log crash reports,](#logging-crashes-on-the-server) make sure that you still call `console.error`. You can also use it to [adjust the status code](#setting-the-status-code) before the shell is emitted.
- * **optional** `onShellReady`: A callback that fires right after the [initial shell](#specifying-what-goes-into-the-shell) has been rendered. You can [set the status code](#setting-the-status-code) and call `pipe` here to start streaming. React will [stream the additional content](#streaming-more-content-as-it-loads) after the shell along with the inline `