Skip to content

Commit 137bb4d

Browse files
merging all conflicts
2 parents 6e98c10 + 0f2284d commit 137bb4d

14 files changed

+80
-50
lines changed

src/components/Layout/Footer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export function Footer() {
283283
<div
284284
className="text-xs text-left rtl:text-right mt-2 pe-0.5"
285285
dir="ltr">
286-
&copy;{new Date().getFullYear()}
286+
Copyright &copy; Meta Platforms, Inc
287287
</div>
288288
<div
289289
className="uwu-visible text-xs cursor-pointer hover:text-link hover:dark:text-link-dark hover:underline"

src/content/blog/2023/03/16/introducing-react-dev.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Use the conditional operator (`cond ? a : b`) to render a ❌ if `isPacked` isn
269269
function Item({ name, isPacked }) {
270270
return (
271271
<li className="item">
272-
{name} {isPacked && ''}
272+
{name} {isPacked && ''}
273273
</li>
274274
);
275275
}
@@ -307,7 +307,7 @@ export default function PackingList() {
307307
function Item({ name, isPacked }) {
308308
return (
309309
<li className="item">
310-
{name} {isPacked ? '' : ''}
310+
{name} {isPacked ? '' : ''}
311311
</li>
312312
);
313313
}

src/content/community/conferences.md

+35-20
Original file line numberDiff line numberDiff line change
@@ -10,26 +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 Nexus 2024 {/*react-nexus-2024*/}
14-
July 04 & 05, 2024. Bangalore, India (In-person event)
15-
16-
[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)
17-
18-
### Chain React 2024 {/*chain-react-2024*/}
19-
July 17-19, 2024. In-person in Portland, OR, USA
20-
21-
[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf)
22-
23-
### The Geek Conf 2024 {/*the-geek-conf-2024*/}
24-
July 25, 2024. In-person in Berlin, Germany + remote (hybrid event)
25-
26-
[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf)
27-
28-
### React Rally 2024 🐙 {/*react-rally-2024*/}
29-
August 12-13, 2024. Park City, UT, USA
30-
31-
[Website](https://reactrally.com) - [Twitter](https://twitter.com/ReactRally) - [YouTube](https://www.youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw)
32-
3313
### React Universe Conf 2024 {/*react-universe-conf-2024*/}
3414
September 5-6, 2024. Wrocław, Poland.
3515

@@ -55,13 +35,48 @@ October 18, 2024. In-person in Brussels, Belgium (hybrid event)
5535

5636
[Website](https://www.react.brussels/) - [Twitter](https://x.com/BrusselsReact)
5737

38+
### React Advanced London 2024 {/*react-advanced-london-2024*/}
39+
October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
40+
41+
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
42+
43+
### React Summit US 2024 {/*react-summit-us-2024*/}
44+
November 19 & 22, 2024. In-person in New York, USA + online (hybrid event)
45+
46+
[Website](https://reactsummit.us/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
47+
5848
### React Africa 2024 {/*react-africa-2024*/}
5949
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
6050

6151
[Website](https://react-africa.com/) - [Twitter](https://x.com/BeJS_)
6252

53+
### React Day Berlin 2024 {/*react-day-berlin-2024*/}
54+
December 13 & 16, 2024. In-person in Berlin, Germany + remote (hybrid event)
55+
56+
[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin)
57+
6358
## Past Conferences {/*past-conferences*/}
6459

60+
### React Rally 2024 🐙 {/*react-rally-2024*/}
61+
August 12-13, 2024. Park City, UT, USA
62+
63+
[Website](https://reactrally.com) - [Twitter](https://twitter.com/ReactRally) - [YouTube](https://www.youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw)
64+
65+
### The Geek Conf 2024 {/*the-geek-conf-2024*/}
66+
July 25, 2024. In-person in Berlin, Germany + remote (hybrid event)
67+
68+
[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf)
69+
70+
### Chain React 2024 {/*chain-react-2024*/}
71+
July 17-19, 2024. In-person in Portland, OR, USA
72+
73+
[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf)
74+
75+
### React Nexus 2024 {/*react-nexus-2024*/}
76+
July 04 & 05, 2024. Bangalore, India (In-person event)
77+
78+
[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)
79+
6580
### React Summit 2024 {/*react-summit-2024*/}
6681
June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event)
6782

src/content/learn/conditional-rendering.md

+22-14
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ export default function PackingList() {
5353

5454
</Sandpack>
5555

56+
<<<<<<< HEAD
5657
Zauważ, że dla niektórych komponentów `Item` właściwość `isPacked` ustawiono na `true` zamiast `false`. Chcielibyśmy, żeby przy spakowanych przedmiotach, które mają ustawione `isPacked={true}`, wyświetlał się "ptaszek" (✔).
58+
=======
59+
Notice that some of the `Item` components have their `isPacked` prop set to `true` instead of `false`. You want to add a checkmark (✅) to packed items if `isPacked={true}`.
60+
>>>>>>> 0f2284ddc8dcab8bbb9b42c04f3c7af94b5b2e73
5761
5862
Możesz to zapisać za pomocą [warunku `if`/`else`](https://developer.mozilla.org/pl/docs/Web/JavaScript/Reference/Statements/if...else) w ten sposób:
5963

6064
```js
6165
if (isPacked) {
62-
return <li className="item">{name} </li>;
66+
return <li className="item">{name} </li>;
6367
}
6468
return <li className="item">{name}</li>;
6569
```
@@ -71,7 +75,7 @@ Jeśli właściwość `isPacked` jest ustawiona na `true`, ten kod **zwróci odm
7175
```js
7276
function Item({ name, isPacked }) {
7377
if (isPacked) {
74-
return <li className="item">{name} </li>;
78+
return <li className="item">{name} </li>;
7579
}
7680
return <li className="item">{name}</li>;
7781
}
@@ -160,7 +164,7 @@ W praktyce, zwykle komponenty nie zwracają `null`, ponieważ może to okazać s
160164
W poprzednim przykładzie nasz kod decydował, które (jeśli którekolwiek) drzewo JSX-owe zostanie zwrócone przez komponent. Być może widzisz pewne powtórzenia w wyniku renderowania:
161165

162166
```js
163-
<li className="item">{name} </li>
167+
<li className="item">{name} </li>
164168
```
165169

166170
jest bardzo podobne do:
@@ -174,7 +178,7 @@ Oba warunkowe rozgałęzienia zwracają `<li className="item">...</li>`:
174178

175179
```js
176180
if (isPacked) {
177-
return <li className="item">{name} </li>;
181+
return <li className="item">{name} </li>;
178182
}
179183
return <li className="item">{name}</li>;
180184
```
@@ -189,7 +193,7 @@ Zamiast poniższego kodu:
189193

190194
```js
191195
if (isPacked) {
192-
return <li className="item">{name} </li>;
196+
return <li className="item">{name} </li>;
193197
}
194198
return <li className="item">{name}</li>;
195199
```
@@ -199,12 +203,16 @@ Możesz napisać w ten sposób:
199203
```js
200204
return (
201205
<li className="item">
202-
{isPacked ? name + ' ' : name}
206+
{isPacked ? name + ' ' : name}
203207
</li>
204208
);
205209
```
206210

211+
<<<<<<< HEAD
207212
Możesz to wyrażenie przeczytać jako: *"jeśli `isPacked` ma wartość `true`, wtedy (`?`) wyrenderuj `name + ' ✔'`, w przeciwnym razie (`:`) wyrenderuj `name`."*)
213+
=======
214+
You can read it as *"if `isPacked` is true, then (`?`) render `name + ' ✅'`, otherwise (`:`) render `name`"*.
215+
>>>>>>> 0f2284ddc8dcab8bbb9b42c04f3c7af94b5b2e73
208216
209217
<DeepDive>
210218

@@ -224,7 +232,7 @@ function Item({ name, isPacked }) {
224232
<li className="item">
225233
{isPacked ? (
226234
<del>
227-
{name + ' '}
235+
{name + ' '}
228236
</del>
229237
) : (
230238
name
@@ -267,7 +275,7 @@ Kolejnym powszechnie stosowanym skrótem, z którym możesz się zetknąć, jest
267275
```js
268276
return (
269277
<li className="item">
270-
{name} {isPacked && ''}
278+
{name} {isPacked && ''}
271279
</li>
272280
);
273281
```
@@ -282,7 +290,7 @@ Poniżej przedstawiono przykład:
282290
function Item({ name, isPacked }) {
283291
return (
284292
<li className="item">
285-
{name} {isPacked && ''}
293+
{name} {isPacked && ''}
286294
</li>
287295
);
288296
}
@@ -338,7 +346,7 @@ Użyj warunku `if`, aby przypisać ponownie wyrażenie JSX-owe do `itemContent`,
338346

339347
```js
340348
if (isPacked) {
341-
itemContent = name + " ";
349+
itemContent = name + " ";
342350
}
343351
```
344352

@@ -358,7 +366,7 @@ Ten sposób jest najbardziej rozwlekły, jednocześnie jednak najbardziej elasty
358366
function Item({ name, isPacked }) {
359367
let itemContent = name;
360368
if (isPacked) {
361-
itemContent = name + " ";
369+
itemContent = name + " ";
362370
}
363371
return (
364372
<li className="item">
@@ -402,7 +410,7 @@ function Item({ name, isPacked }) {
402410
if (isPacked) {
403411
itemContent = (
404412
<del>
405-
{name + " "}
413+
{name + " "}
406414
</del>
407415
);
408416
}
@@ -465,7 +473,7 @@ Użyj operatora warunkowego (`warunek ? a : b`), aby wyświetlić ❌, jeśli `i
465473
function Item({ name, isPacked }) {
466474
return (
467475
<li className="item">
468-
{name} {isPacked && ''}
476+
{name} {isPacked && ''}
469477
</li>
470478
);
471479
}
@@ -503,7 +511,7 @@ export default function PackingList() {
503511
function Item({ name, isPacked }) {
504512
return (
505513
<li className="item">
506-
{name} {isPacked ? '' : ''}
514+
{name} {isPacked ? '' : ''}
507515
</li>
508516
);
509517
}

src/content/learn/describing-the-ui.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ W tym przykładzie użyliśmy operatora `&&` do warunkowego wyrenderowania tzw.
327327
function Item({ name, isPacked }) {
328328
return (
329329
<li className="item">
330-
{name} {isPacked && ''}
330+
{name} {isPacked && ''}
331331
</li>
332332
);
333333
}

src/content/learn/react-compiler.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ In addition to these docs, we recommend checking the [React Compiler Working Gro
121121
Prior to installing the compiler, you can first check to see if your codebase is compatible:
122122

123123
<TerminalBlock>
124-
npx react-compiler-healthcheck@latest
124+
npx react-compiler-healthcheck@experimental
125125
</TerminalBlock>
126126

127127
This script will:
@@ -143,7 +143,7 @@ Found no usage of incompatible libraries.
143143
React Compiler also powers an eslint plugin. The eslint plugin can be used **independently** of the compiler, meaning you can use the eslint plugin even if you don't use the compiler.
144144

145145
<TerminalBlock>
146-
npm install eslint-plugin-react-compiler
146+
npm install eslint-plugin-react-compiler@experimental
147147
</TerminalBlock>
148148

149149
Then, add it to your eslint config:
@@ -203,7 +203,7 @@ If you're starting a new project, you can enable the compiler on your entire cod
203203
### Babel {/*usage-with-babel*/}
204204

205205
<TerminalBlock>
206-
npm install babel-plugin-react-compiler
206+
npm install babel-plugin-react-compiler@experimental
207207
</TerminalBlock>
208208

209209
The compiler includes a Babel plugin which you can use in your build pipeline to run the compiler.
@@ -258,7 +258,7 @@ Next.js has an experimental configuration to enable the React Compiler. It autom
258258
- Install `babel-plugin-react-compiler`
259259

260260
<TerminalBlock>
261-
npm install next@canary babel-plugin-react-compiler
261+
npm install next@canary babel-plugin-react-compiler@experimental
262262
</TerminalBlock>
263263

264264
Then configure the experimental option in `next.config.js`:

src/content/learn/you-might-not-need-an-effect.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,9 @@ function Game() {
408408
409409
There are two problems with this code.
410410
411-
One problem is that it is very inefficient: the component (and its children) have to re-render between each `set` call in the chain. In the example above, in the worst case (`setCard` → render → `setGoldCardCount` → render → `setRound` → render → `setIsGameOver` → render) there are three unnecessary re-renders of the tree below.
411+
First problem is that it is very inefficient: the component (and its children) have to re-render between each `set` call in the chain. In the example above, in the worst case (`setCard` → render → `setGoldCardCount` → render → `setRound` → render → `setIsGameOver` → render) there are three unnecessary re-renders of the tree below.
412412
413-
Even if it weren't slow, as your code evolves, you will run into cases where the "chain" you wrote doesn't fit the new requirements. Imagine you are adding a way to step through the history of the game moves. You'd do it by updating each state variable to a value from the past. However, setting the `card` state to a value from the past would trigger the Effect chain again and change the data you're showing. Such code is often rigid and fragile.
413+
The second problem is that even if it weren't slow, as your code evolves, you will run into cases where the "chain" you wrote doesn't fit the new requirements. Imagine you are adding a way to step through the history of the game moves. You'd do it by updating each state variable to a value from the past. However, setting the `card` state to a value from the past would trigger the Effect chain again and change the data you're showing. Such code is often rigid and fragile.
414414
415415
In this case, it's better to calculate what you can during rendering, and adjust the state in the event handler:
416416

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ They are special in React because passing the `value` prop to them makes them *[
3434

3535
## Resource and Metadata Components {/*resource-and-metadata-components*/}
3636

37-
These bulit-in browser components let you load external resources or annotate the document with metadata:
37+
These built-in browser components let you load external resources or annotate the document with metadata:
3838

3939
* [`<link>`](/reference/react-dom/components/link)
4040
* [`<meta>`](/reference/react-dom/components/meta)

src/content/reference/react/cache.md

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

231231
async function Profile({id}) {
232232
const user = await getUser(id);
@@ -327,7 +327,7 @@ In general, you should use [`useMemo`](/reference/react/useMemo) for caching a e
327327
'use client';
328328

329329
function WeatherReport({record}) {
330-
const avgTemp = useMemo(() => calculateAvg(record)), record);
330+
const avgTemp = useMemo(() => calculateAvg(record), record);
331331
// ...
332332
}
333333

src/content/reference/react/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The React reference documentation is broken down into functional subsections:
1515
Programmatic React features:
1616

1717
* [Hooks](/reference/react/hooks) - Use different React features from your components.
18-
* [Components](/reference/react/components) - Documents built-in components that you can use in your JSX.
18+
* [Components](/reference/react/components) - Built-in components that you can use in your JSX.
1919
* [APIs](/reference/react/apis) - APIs that are useful for defining components.
2020
* [Directives](/reference/rsc/directives) - Provide instructions to bundlers compatible with React Server Components.
2121

src/content/reference/react/lazy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Now that your component's code loads on demand, you also need to specify what sh
7878
<Suspense fallback={<Loading />}>
7979
<h2>Preview</h2>
8080
<MarkdownPreview />
81-
</Suspense>
81+
</Suspense>
8282
```
8383

8484
In this example, the code for `MarkdownPreview` won't be loaded until you attempt to render it. If `MarkdownPreview` hasn't loaded yet, `Loading` will be shown in its place. Try ticking the checkbox:

src/content/reference/react/useLayoutEffect.md

+2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ function Tooltip() {
6767
6868
* The code inside `useLayoutEffect` and all state updates scheduled from it **block the browser from repainting the screen.** When used excessively, this makes your app slow. When possible, prefer [`useEffect`.](/reference/react/useEffect)
6969
70+
* If you trigger a state update inside `useLayoutEffect`, React will execute all remaining Effects immediately including `useEffect`.
71+
7072
---
7173
7274
## Usage {/*usage*/}

src/content/reference/react/useSyncExternalStore.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ It returns the snapshot of the data in the store. You need to pass two functions
4141
4242
#### Parameters {/*parameters*/}
4343
44-
* `subscribe`: A function that takes a single `callback` argument and subscribes it to the store. When the store changes, it should invoke the provided `callback`. This will cause the component to re-render. The `subscribe` function should return a function that cleans up the subscription.
44+
* `subscribe`: A function that takes a single `callback` argument and subscribes it to the store. When the store changes, it should invoke the provided `callback`, which will cause React to re-call `getSnapshot` and (if needed) re-render the component. The `subscribe` function should return a function that cleans up the subscription.
4545
4646
* `getSnapshot`: A function that returns a snapshot of the data in the store that's needed by the component. While the store has not changed, repeated calls to `getSnapshot` must return the same value. If the store changes and the returned value is different (as compared by [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)), React re-renders the component.
4747

vercel.json

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
"destination": "/learn/rendering-lists#keeping-list-items-in-order-with-key",
2525
"permanent": false
2626
},
27+
{
28+
"source": "/docs/lists-and-keys",
29+
"destination": "/learn/rendering-lists#keeping-list-items-in-order-with-key",
30+
"permanent": false
31+
},
2732
{
2833
"source": "/link/invalid-hook-call",
2934
"destination": "/warnings/invalid-hook-call-warning",

0 commit comments

Comments
 (0)