Skip to content

Commit 010ff01

Browse files
authored
Merge pull request #69 from reactjs/sync-1697ae89
Sync with react.dev @ 1697ae8
2 parents 0eb51e0 + 331babf commit 010ff01

17 files changed

+61
-83
lines changed

src/components/MDX/Sandpack/Preview.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function Preview({
113113
/**
114114
* The spinner component transition might be longer than
115115
* the bundler loading, so we only show the spinner if
116-
* it takes more than 1s to load the bundler.
116+
* it takes more than 500s to load the bundler.
117117
*/
118118
timeout = setTimeout(() => {
119119
setShowLoading(true);

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ npm install react-shallow-renderer --save-dev
353353

354354
##### Please reconsider shallow rendering {/*please-reconsider-shallow-rendering*/}
355355

356-
Shallow rendering depends on React internals and can block you from future upgrades. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/docs/getting-started).
356+
Shallow rendering depends on React internals and can block you from future upgrades. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro).
357357

358358
</Note>
359359

@@ -524,7 +524,7 @@ We are deprecating `react-test-renderer` because it implements its own renderer
524524

525525
The test renderer was created before there were more viable testing strategies available like [React Testing Library](https://testing-library.com), and we now recommend using a modern testing library instead.
526526

527-
In React 19, `react-test-renderer` logs a deprecation warning, and has switched to concurrent rendering. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://callstack.github.io/react-native-testing-library/docs/getting-started) for a modern and well supported testing experience.
527+
In React 19, `react-test-renderer` logs a deprecation warning, and has switched to concurrent rendering. We recommend migrating your tests to [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro) for a modern and well supported testing experience.
528528

529529
## Notable changes {/*notable-changes*/}
530530

src/content/community/acknowledgements.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ We'd like to recognize a few people who have made significant contributions to R
5959

6060
This list is not exhaustive.
6161

62-
We'd like to give special thanks to [Tom Occhino](https://github.com/tomocchino) and [Adam Wolff](https://github.com/wolffiex) for their guidance and support over the years. We are also thankful to all the volunteers who [translated React into other languages.](https://translations.reactjs.org/)
62+
We'd like to give special thanks to [Tom Occhino](https://github.com/tomocchino) and [Adam Wolff](https://github.com/wolffiex) for their guidance and support over the years. We are also thankful to all the volunteers who [translated React into other languages.](https://translations.react.dev/)
6363

6464
## Additional Thanks {/*additional-thanks*/}
6565

src/content/community/conferences.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
4545

4646
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
4747

48+
### React Native London Conf 2024 {/*react-native-london-2024*/}
49+
November 14 & 15, 2024. In-person in London, UK
50+
51+
[Website](https://reactnativelondon.co.uk/) - [Twitter](https://x.com/RNLConf)
52+
4853
### React Summit US 2024 {/*react-summit-us-2024*/}
4954
November 19 & 22, 2024. In-person in New York, USA + online (hybrid event)
5055

@@ -82,16 +87,15 @@ July 04 & 05, 2024. Bangalore, India (In-person event)
8287

8388
[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)
8489

85-
### React Africa 2024 {/*react-africa-2024*/}
86-
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
90+
### React Summit US 2024 {/*react-summit-us-2024*/}
91+
November 19 & 22, 2024. In-person in New York, USA + online (hybrid event)
8792

88-
[Website](https://react-africa.com/) - [Twitter](https://x.com/BeJS_)
93+
[Website](https://reactsummit.us/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
8994

9095
### React Norway 2024 {/*react-norway-2024*/}
9196
June 14, 2024. In-person at Farris Bad Hotel in Larvik, Norway and online (hybrid event).
9297

93-
### React Rally 2024 🐙 {/*react-rally-2024*/}
94-
August 12-13, 2024. Park City, UT, USA
98+
[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin)
9599

96100
### Render(ATL) 2024 🍑 {/*renderatl-2024-*/}
97101
June 12 - June 14, 2024. Atlanta, GA, USA

src/content/community/meetups.md

+3-39
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,8 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
3030
* [Belo Horizonte](https://www.meetup.com/reactbh/)
3131
* [Curitiba](https://www.meetup.com/pt-br/ReactJS-CWB/)
3232
* [Florianópolis](https://www.meetup.com/pt-br/ReactJS-Floripa/)
33-
* [Goiânia](https://www.meetup.com/pt-br/React-Goiania/)
3433
* [Joinville](https://www.meetup.com/pt-BR/React-Joinville/)
35-
* [Juiz de Fora](https://www.meetup.com/pt-br/React-Juiz-de-Fora/)
36-
* [Maringá](https://www.meetup.com/pt-BR/React-Maringa/)
37-
* [Porto Alegre](https://www.meetup.com/pt-BR/React-Porto-Alegre/)
38-
* [Rio de Janeiro](https://www.meetup.com/pt-BR/React-Rio-de-Janeiro/)
39-
* [Salvador](https://www.meetup.com/pt-BR/ReactSSA)
4034
* [São Paulo](https://www.meetup.com/pt-BR/ReactJS-SP/)
41-
* [Vila Velha](https://www.meetup.com/pt-BR/React-ES/)
4235

4336
## Bolivia {/*bolivia*/}
4437
* [Bolivia](https://www.meetup.com/ReactBolivia/)
@@ -51,32 +44,20 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
5144
* [Saskatoon, SK](https://www.meetup.com/saskatoon-react-meetup/)
5245
* [Toronto, ON](https://www.meetup.com/Toronto-React-Native/events/)
5346

54-
## Chile {/*chile*/}
55-
* [Santiago](https://www.meetup.com/es-ES/react-santiago/)
56-
57-
## China {/*china*/}
58-
* [Beijing](https://www.meetup.com/Beijing-ReactJS-Meetup/)
59-
6047
## Colombia {/*colombia*/}
61-
* [Bogotá](https://www.meetup.com/meetup-group-iHIeHykY/)
6248
* [Medellin](https://www.meetup.com/React-Medellin/)
63-
* [Cali](https://www.meetup.com/reactcali/)
6449

6550
## Denmark {/*denmark*/}
6651
* [Aalborg](https://www.meetup.com/Aalborg-React-React-Native-Meetup/)
6752
* [Aarhus](https://www.meetup.com/Aarhus-ReactJS-Meetup/)
6853

69-
## Egypt {/*egypt*/}
70-
* [Cairo](https://www.meetup.com/react-cairo/)
71-
7254
## England (UK) {/*england-uk*/}
7355
* [Manchester](https://www.meetup.com/Manchester-React-User-Group/)
7456
* [React.JS Girls London](https://www.meetup.com/ReactJS-Girls-London/)
7557
* [React Advanced London](https://guild.host/react-advanced-london)
7658
* [React Native London](https://guild.host/RNLDN)
7759

7860
## France {/*france*/}
79-
* [Nantes](https://www.meetup.com/React-Nantes/)
8061
* [Lille](https://www.meetup.com/ReactBeerLille/)
8162
* [Paris](https://www.meetup.com/ReactJS-Paris/)
8263

@@ -93,9 +74,6 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
9374
* [Athens](https://www.meetup.com/React-To-React-Athens-MeetUp/)
9475
* [Thessaloniki](https://www.meetup.com/Thessaloniki-ReactJS-Meetup/)
9576

96-
## Hungary {/*hungary*/}
97-
* [Budapest](https://www.meetup.com/React-Budapest/)
98-
9977
## India {/*india*/}
10078
* [Ahmedabad](https://www.meetup.com/react-ahmedabad/)
10179
* [Bangalore (React)](https://www.meetup.com/ReactJS-Bangalore/)
@@ -117,6 +95,9 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
11795
## Italy {/*italy*/}
11896
* [Milan](https://www.meetup.com/React-JS-Milano/)
11997

98+
## Japan {/*japan*/}
99+
* [Osaka](https://react-osaka.connpass.com/)
100+
120101
## Kenya {/*kenya*/}
121102
* [Nairobi - Reactdevske](https://kommunity.com/reactjs-developer-community-kenya-reactdevske)
122103

@@ -138,12 +119,6 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
138119
* [Karachi](https://www.facebook.com/groups/902678696597634/)
139120
* [Lahore](https://www.facebook.com/groups/ReactjsLahore/)
140121

141-
## Panama {/*panama*/}
142-
* [Panama](https://www.meetup.com/React-Panama/)
143-
144-
## Peru {/*peru*/}
145-
* [Lima](https://www.meetup.com/ReactJS-Peru/)
146-
147122
## Philippines {/*philippines*/}
148123
* [Manila](https://www.meetup.com/reactjs-developers-manila/)
149124
* [Manila - ReactJS PH](https://www.meetup.com/ReactJS-Philippines/)
@@ -160,7 +135,6 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
160135

161136
## Spain {/*spain*/}
162137
* [Barcelona](https://www.meetup.com/ReactJS-Barcelona/)
163-
* [Canarias](https://www.meetup.com/React-Canarias/)
164138

165139
## Sweden {/*sweden*/}
166140
* [Goteborg](https://www.meetup.com/ReactJS-Goteborg/)
@@ -176,7 +150,6 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
176150
* [Kyiv](https://www.meetup.com/Kyiv-ReactJS-Meetup)
177151

178152
## US {/*us*/}
179-
* [Ann Arbor, MI - ReactJS](https://www.meetup.com/AnnArbor-jsx/)
180153
* [Atlanta, GA - ReactJS](https://www.meetup.com/React-ATL/)
181154
* [Austin, TX - ReactJS](https://www.meetup.com/ReactJS-Austin-Meetup/)
182155
* [Boston, MA - ReactJS](https://www.meetup.com/ReactJS-Boston/)
@@ -187,7 +160,6 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
187160
* [Cleveland, OH - ReactJS](https://www.meetup.com/Cleveland-React/)
188161
* [Columbus, OH - ReactJS](https://www.meetup.com/ReactJS-Columbus-meetup/)
189162
* [Dallas, TX - ReactJS](https://www.meetup.com/ReactDallas/)
190-
* [Dallas, TX - [Remote] React JS](https://www.meetup.com/React-JS-Group/)
191163
* [Detroit, MI - Detroit React User Group](https://www.meetup.com/Detroit-React-User-Group/)
192164
* [Indianapolis, IN - React.Indy](https://www.meetup.com/React-Indy)
193165
* [Irvine, CA - ReactJS](https://www.meetup.com/ReactJS-OC/)
@@ -197,27 +169,19 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
197169
* [Los Angeles, CA - ReactJS](https://www.meetup.com/socal-react/)
198170
* [Los Angeles, CA - React Native](https://www.meetup.com/React-Native-Los-Angeles/)
199171
* [Miami, FL - ReactJS](https://www.meetup.com/React-Miami/)
200-
* [Nashville, TN - ReactJS](https://www.meetup.com/NashReact-Meetup/)
201172
* [New York, NY - ReactJS](https://www.meetup.com/NYC-Javascript-React-Group/)
202173
* [New York, NY - React Ladies](https://www.meetup.com/React-Ladies/)
203174
* [New York, NY - React Native](https://www.meetup.com/React-Native-NYC/)
204175
* [New York, NY - useReactNYC](https://www.meetup.com/useReactNYC/)
205176
* [New York, NY - React.NYC](https://guild.host/react-nyc)
206-
* [Omaha, NE - ReactJS/React Native](https://www.meetup.com/omaha-react-meetup-group/)
207177
* [Palo Alto, CA - React Native](https://www.meetup.com/React-Native-Silicon-Valley/)
208-
* [Philadelphia, PA - ReactJS](https://www.meetup.com/Reactadelphia/)
209178
* [Phoenix, AZ - ReactJS](https://www.meetup.com/ReactJS-Phoenix/)
210-
* [Pittsburgh, PA - ReactJS/React Native](https://www.meetup.com/ReactPgh/)
211-
* [Portland, OR - ReactJS](https://www.meetup.com/Portland-ReactJS/)
212179
* [Provo, UT - ReactJS](https://www.meetup.com/ReactJS-Utah/)
213-
* [Sacramento, CA - ReactJS](https://www.meetup.com/Sacramento-ReactJS-Meetup/)
214180
* [San Diego, CA - San Diego JS](https://www.meetup.com/sandiegojs/)
215181
* [San Francisco - Real World React](https://www.meetup.com/Real-World-React)
216182
* [San Francisco - ReactJS](https://www.meetup.com/ReactJS-San-Francisco/)
217183
* [San Francisco, CA - React Native](https://www.meetup.com/React-Native-San-Francisco/)
218-
* [San Ramon, CA - TriValley Coders](https://www.meetup.com/trivalleycoders/)
219184
* [Santa Monica, CA - ReactJS](https://www.meetup.com/Los-Angeles-ReactJS-User-Group/)
220-
* [Seattle, WA - React Native](https://www.meetup.com/Seattle-React-Native-Meetup/)
221185
* [Seattle, WA - ReactJS](https://www.meetup.com/seattle-react-js/)
222186
* [Tampa, FL - ReactJS](https://www.meetup.com/ReactJS-Tampa-Bay/)
223187
* [Tucson, AZ - ReactJS](https://www.meetup.com/Tucson-ReactJS-Meetup/)

src/content/learn/manipulating-the-dom-with-refs.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -124,35 +124,35 @@ export default function CatFriends() {
124124
<>
125125
<nav>
126126
<button onClick={handleScrollToFirstCat}>
127-
Tom
127+
Neo
128128
</button>
129129
<button onClick={handleScrollToSecondCat}>
130-
Maru
130+
Millie
131131
</button>
132132
<button onClick={handleScrollToThirdCat}>
133-
Jellylorum
133+
Bella
134134
</button>
135135
</nav>
136136
<div>
137137
<ul>
138138
<li>
139139
<img
140-
src="https://placekitten.com/g/200/200"
141-
alt="Tom"
140+
src="https://placecats.com/neo/300/200"
141+
alt="Neo"
142142
ref={firstCatRef}
143143
/>
144144
</li>
145145
<li>
146146
<img
147-
src="https://placekitten.com/g/300/200"
148-
alt="Maru"
147+
src="https://placecats.com/millie/200/200"
148+
alt="Millie"
149149
ref={secondCatRef}
150150
/>
151151
</li>
152152
<li>
153153
<img
154-
src="https://placekitten.com/g/250/200"
155-
alt="Jellylorum"
154+
src="https://placecats.com/bella/199/200"
155+
alt="Bella"
156156
ref={thirdCatRef}
157157
/>
158158
</li>
@@ -245,9 +245,9 @@ export default function CatFriends() {
245245
return (
246246
<>
247247
<nav>
248-
<button onClick={() => scrollToCat(catList[0])}>Tom</button>
249-
<button onClick={() => scrollToCat(catList[5])}>Maru</button>
250-
<button onClick={() => scrollToCat(catList[9])}>Jellylorum</button>
248+
<button onClick={() => scrollToCat(catList[0])}>Neo</button>
249+
<button onClick={() => scrollToCat(catList[5])}>Millie</button>
250+
<button onClick={() => scrollToCat(catList[9])}>Bella</button>
251251
</nav>
252252
<div>
253253
<ul>
@@ -948,7 +948,7 @@ const catList = [];
948948
for (let i = 0; i < 10; i++) {
949949
catList.push({
950950
id: i,
951-
imageUrl: 'https://placekitten.com/250/200?image=' + i
951+
imageUrl: 'https://loremflickr.com/250/200/cat?lock=' + i
952952
});
953953
}
954954

@@ -1065,7 +1065,7 @@ const catList = [];
10651065
for (let i = 0; i < 10; i++) {
10661066
catList.push({
10671067
id: i,
1068-
imageUrl: 'https://placekitten.com/250/200?image=' + i
1068+
imageUrl: 'https://loremflickr.com/250/200/cat?lock=' + i
10691069
});
10701070
}
10711071

src/content/learn/synchronizing-with-effects.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ See the examples below for how to handle common patterns.
627627
628628
### Controlling non-React widgets {/*controlling-non-react-widgets*/}
629629
630-
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:
630+
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:
631631
632632
```js
633633
useEffect(() => {

src/content/learn/thinking-in-react.md

+8
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,15 @@ In the previous step, you found two pieces of state in this application: the sea
261261

262262
Katika hatua ya awali, ulipata vipande viwili vya hali katika programu hii: maandishi ya ingizo ya utafutaji, na thamani ya kisanduku cha kuteua. Katika mfano huu, daima huonekana pamoja, kwa hiyo ni mantiki kuviweka katika sehemu moja.
263263

264+
<<<<<<< HEAD
264265
Sasa wacha tupitie mkakati wetu kwao:
266+
=======
267+
1. **Identify components that use state:**
268+
* `ProductTable` needs to filter the product list based on that state (search text and checkbox value).
269+
* `SearchBar` needs to display that state (search text and checkbox value).
270+
2. **Find their common parent:** The first parent component both components share is `FilterableProductTable`.
271+
3. **Decide where the state lives**: We'll keep the filter text and checked state values in `FilterableProductTable`.
272+
>>>>>>> 1697ae89a3bbafd76998dd7496754e5358bc1e9a
265273
266274
1. **Tambua vijenzi vinavyotumia hali:**
267275
* `ProductTable` inahitaji kuchuja orodha ya bidhaa kulingana na hali hiyo (maandishi ya utafutaji na thamani ya kisanduku cha kuteua).

src/content/learn/tutorial-tic-tac-toe.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ Calling the `setSquares` function lets React know the state of the component has
11331133
11341134
<Note>
11351135
1136-
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.
1136+
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.
11371137
11381138
</Note>
11391139

src/content/learn/updating-objects-in-state.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ This example holds an object in state to represent the current pointer position.
5757

5858
```js
5959
import { useState } from 'react';
60+
6061
export default function MovingDot() {
6162
const [position, setPosition] = useState({
6263
x: 0,
@@ -127,6 +128,7 @@ Notice how the red dot now follows your pointer when you touch or hover over the
127128

128129
```js
129130
import { useState } from 'react';
131+
130132
export default function MovingDot() {
131133
const [position, setPosition] = useState({
132134
x: 0,
@@ -377,7 +379,7 @@ Note that the `...` spread syntax is "shallow"--it only copies things one level
377379

378380
#### Using a single event handler for multiple fields {/*using-a-single-event-handler-for-multiple-fields*/}
379381

380-
You can also use the `[` and `]` braces inside your object definition to specify a property with dynamic name. Here is the same example, but with a single event handler instead of three different ones:
382+
You can also use the `[` and `]` braces inside your object definition to specify a property with a dynamic name. Here is the same example, but with a single event handler instead of three different ones:
381383

382384
<Sandpack>
383385

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The `preinitModule` function provides the browser with a hint that it should sta
5151

5252
#### Parameters {/*parameters*/}
5353

54-
* `href`: a string. The URL of the module you want to download and exeucute.
54+
* `href`: a string. The URL of the module you want to download and execute.
5555
* `options`: an object. It contains the following properties:
5656
* `as`: a required string. It must be `'script'`.
5757
* `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`.

0 commit comments

Comments
 (0)