Skip to content

Commit 0d65544

Browse files
Merge pull request #52 from reactjs/sync-56df8af5
Sync with react.dev @ 56df8af
2 parents 0c680d6 + 8ddb8ee commit 0d65544

File tree

7 files changed

+52
-51
lines changed

7 files changed

+52
-51
lines changed

src/content/blog/2024/04/25/react-19-upgrade-guide.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ We expect most apps will not be affected since the transform is enabled in most
7070
To install the latest version of React and React DOM:
7171

7272
```bash
73-
npm install react@rc react-dom@rc
73+
npm install --save-exact react@rc react-dom@rc
74+
```
75+
76+
Or, if you're using Yarn:
77+
78+
```bash
79+
yarn add --exact react@rc react-dom@rc
7480
```
7581

7682
If you're using TypeScript, you also need to update the types. Once React 19 is released as stable, you can install the types as usual from `@types/react` and `@types/react-dom`. Until the stable release, the types are available in different packages which need to be enforced in your `package.json`:

src/content/community/conferences.md

+35-40
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c
1010

1111
## Upcoming Conferences {/*upcoming-conferences*/}
1212

13-
### React Paris 2024 {/*react-paris-2024*/}
14-
March 22, 2024. In-person in Paris, France + Remote (hybrid)
15-
16-
[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/)
17-
18-
### Epic Web Conf 2024 {/*epic-web-2024*/}
19-
April 10 - 11, 2024. In-person in Park City, UT, USA
20-
21-
[Website](https://www.epicweb.dev/conf) - [YouTube](https://www.youtube.com/@EpicWebDev)
22-
23-
### React Miami 2024 {/*react-miami-2024*/}
24-
April 19 - 20, 2024. In-person in Miami, FL, USA
25-
26-
[Website](https://reactmiami.com/) - [Twitter](https://twitter.com/ReactMiamiConf)
27-
28-
### React Connection 2024 {/*react-connection-2024*/}
29-
April 22, 2024. In-person in Paris, France
30-
31-
[Website](https://reactconnection.io/) - [Twitter](https://twitter.com/ReactConn)
32-
33-
### React Native Connection 2024 {/*react-native-connection-2024*/}
34-
April 23, 2024. In-person in Paris, France
35-
36-
[Website](https://reactnativeconnection.io/) - [Twitter](https://twitter.com/ReactNativeConn)
37-
38-
### React Conf 2024 {/*react-conf-2024*/}
39-
May 15 - 16, 2024. In-person in Henderson, NV, USA + remote
40-
41-
[Website](https://conf.react.dev) - [Twitter](https://twitter.com/reactjs)
42-
43-
### App.js Conf 2024 {/*appjs-conf-2024*/}
44-
May 22 - 24, 2024. In-person in Kraków, Poland + remote
45-
46-
[Website](https://appjs.co) - [Twitter](https://twitter.com/appjsconf)
47-
48-
### Frontend Nation 2024 {/*frontend-nation-2024*/}
49-
June 4 - 7, 2024. Online
50-
51-
[Website](https://frontendnation.com/) - [Twitter](https://twitter.com/frontendnation)
52-
5313
### React Summit 2024 {/*react-summit-2024*/}
5414
June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event)
5515

@@ -103,6 +63,41 @@ October 17 - 19, 2024. In-person in Goa, India (hybrid event) + Oct 15 2024 - re
10363

10464
## Past Conferences {/*past-conferences*/}
10565

66+
### Frontend Nation 2024 {/*frontend-nation-2024*/}
67+
June 4 - 7, 2024. Online
68+
69+
[Website](https://frontendnation.com/) - [Twitter](https://twitter.com/frontendnation)
70+
71+
### App.js Conf 2024 {/*appjs-conf-2024*/}
72+
May 22 - 24, 2024. In-person in Kraków, Poland + remote
73+
74+
[Website](https://appjs.co) - [Twitter](https://twitter.com/appjsconf)
75+
76+
### React Conf 2024 {/*react-conf-2024*/}
77+
May 15 - 16, 2024. In-person in Henderson, NV, USA + remote
78+
79+
[Website](https://conf.react.dev) - [Twitter](https://twitter.com/reactjs)
80+
81+
### React Native Connection 2024 {/*react-native-connection-2024*/}
82+
April 23, 2024. In-person in Paris, France
83+
84+
[Website](https://reactnativeconnection.io/) - [Twitter](https://twitter.com/ReactNativeConn)
85+
86+
### React Miami 2024 {/*react-miami-2024*/}
87+
April 19 - 20, 2024. In-person in Miami, FL, USA
88+
89+
[Website](https://reactmiami.com/) - [Twitter](https://twitter.com/ReactMiamiConf)
90+
91+
### Epic Web Conf 2024 {/*epic-web-2024*/}
92+
April 10 - 11, 2024. In-person in Park City, UT, USA
93+
94+
[Website](https://www.epicweb.dev/conf) - [YouTube](https://www.youtube.com/@EpicWebDev)
95+
96+
### React Paris 2024 {/*react-paris-2024*/}
97+
March 22, 2024. In-person in Paris, France + Remote (hybrid)
98+
99+
[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/)
100+
106101
### React Day Berlin 2023 {/*react-day-berlin-2023*/}
107102
December 8 & 12, 2023. In-person in Berlin, Germany + remote first interactivity (hybrid event)
108103

src/content/learn/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function App() {
3737

3838
You can edit it directly or open it in a new tab by pressing the "Fork" button in the upper right corner.
3939

40-
Most pages in the React documentation contain sandboxes like this. Outside of the React documentation, there are many online sandboxes that support React: for example, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), or [CodePen.](https://codepen.io/pen?&editors=0010&layout=left&prefill_data_id=3f4569d1-1b11-4bce-bd46-89090eed5ddb)
40+
Most pages in the React documentation contain sandboxes like this. Outside of the React documentation, there are many online sandboxes that support React: for example, [CodeSandbox](https://codesandbox.io/s/new), [StackBlitz](https://stackblitz.com/fork/react), or [CodePen.](https://codepen.io/pen?template=QWYVwWN)
4141

4242
### Try React locally {/*try-react-locally*/}
4343

src/content/reference/react-dom/components/script.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ Props that are **not recommended** for use with React:
6868

6969
#### Special rendering behavior {/*special-rendering-behavior*/}
7070

71-
React can move `<script>` components to the document's `<head>`, de-duplicate identical scripts, and [suspend](/reference/react/Suspense) while the script is loading.
71+
React can move `<script>` components to the document's `<head>` and de-duplicate identical scripts.
7272

7373
To opt into this behavior, provide the `src` and `async={true}` props. React will de-duplicate scripts if they have the same `src`. The `async` prop must be true to allow scripts to be safely moved.
7474

75-
If you supply any of the `onLoad` or `onError` props, there is no special behavior, because these props indicate that you are managing the loading of the script manually within your component.
76-
7775
This special treatment comes with two caveats:
7876

7977
* React will ignore changes to props after the script has been rendered. (React will issue a warning in development if this happens.)
@@ -86,8 +84,10 @@ This special treatment comes with two caveats:
8684
### Rendering an external script {/*rendering-an-external-script*/}
8785

8886
If a component depends on certain scripts in order to be displayed correctly, you can render a `<script>` within the component.
87+
However, the component might be committed before the script has finished loading.
88+
You can start depending on the script content once the `load` event is fired e.g. by using the `onLoad` prop.
8989

90-
If you supply an `src` and `async` prop, your component will suspend while the script is loading. React will de-duplicate scripts that have the same `src`, inserting only one of them into the DOM even if multiple components render it.
90+
React will de-duplicate scripts that have the same `src`, inserting only one of them into the DOM even if multiple components render it.
9191

9292
<SandpackWithHTMLOutput>
9393

@@ -97,7 +97,7 @@ import ShowRenderedHTML from './ShowRenderedHTML.js';
9797
function Map({lat, long}) {
9898
return (
9999
<>
100-
<script async src="map-api.js" />
100+
<script async src="map-api.js" onLoad={() => console.log('script loaded')} />
101101
<div id="map" data-lat={lat} data-long={long} />
102102
</>
103103
);
@@ -120,7 +120,7 @@ When you want to use a script, it can be beneficial to call the [preinit](/refer
120120

121121
### Rendering an inline script {/*rendering-an-inline-script*/}
122122

123-
To include an inline script, render the `<script>` component with the script source code as its children. Inline scripts are not de-duplicated or moved to the document `<head>`, and since they don't load any external resources, they will not cause your component to suspend.
123+
To include an inline script, render the `<script>` component with the script source code as its children. Inline scripts are not de-duplicated or moved to the document `<head>`.
124124

125125
<SandpackWithHTMLOutput>
126126

src/content/reference/react-dom/preinit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The `preinit` function is currently only available in React's Canary and experim
2020
`preinit` lets you eagerly fetch and evaluate a stylesheet or external script.
2121

2222
```js
23-
preinit("https://example.com/script.js", {as: "style"});
23+
preinit("https://example.com/script.js", {as: "script"});
2424
```
2525

2626
</Intro>

src/content/reference/react/act.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ it('can render and update a counter', async () => {
109109
});
110110
```
111111

112-
Here, wwe create a container, append it to the document, and render the `Counter` component inside `act()`. This ensures that the component is rendered and its effects are applied before making assertions.
112+
Here, we create a container, append it to the document, and render the `Counter` component inside `act()`. This ensures that the component is rendered and its effects are applied before making assertions.
113113

114114
Using `act` ensures that all updates have been applied before we make assertions.
115115

src/content/reference/react/cache.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ By caching a long-running data fetch, you can kick off asynchronous work prior t
228228
```jsx [[2, 6, "await getUser(id)"], [1, 17, "getUser(id)"]]
229229
const getUser = cache(async (id) => {
230230
return await db.user.query(id);
231-
}
231+
})
232232

233233
async function Profile({id}) {
234234
const user = await getUser(id);

0 commit comments

Comments
 (0)