Skip to content

Commit eb15362

Browse files
merging all conflicts
2 parents 6e98c10 + fe37c42 commit eb15362

26 files changed

+1293
-1135
lines changed

.github/workflows/analyze.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ jobs:
1111
analyze:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- name: Set up node
17-
uses: actions/setup-node@v1
17+
uses: actions/setup-node@v3
1818
with:
1919
node-version: '20.x'
2020

2121
- name: Install dependencies
2222
uses: bahmutov/[email protected]
2323

2424
- name: Restore next build
25-
uses: actions/cache@v2
25+
uses: actions/cache@v3
2626
id: restore-build-cache
2727
env:
2828
cache-name: cache-next-build
@@ -41,7 +41,7 @@ jobs:
4141
run: npx -p [email protected] report
4242

4343
- name: Upload bundle
44-
uses: actions/upload-artifact@v2
44+
uses: actions/upload-artifact@v3
4545
with:
4646
path: .next/analyze/__bundle_analysis.json
4747
name: bundle_analysis.json
@@ -73,7 +73,7 @@ jobs:
7373
run: ls -laR .next/analyze/base && npx -p nextjs-bundle-analysis compare
7474

7575
- name: Upload analysis comment
76-
uses: actions/upload-artifact@v2
76+
uses: actions/upload-artifact@v3
7777
with:
7878
name: analysis_comment.txt
7979
path: .next/analyze/__bundle_analysis_comment.txt
@@ -82,7 +82,7 @@ jobs:
8282
run: echo ${{ github.event.number }} > ./pr_number
8383

8484
- name: Upload PR number
85-
uses: actions/upload-artifact@v2
85+
uses: actions/upload-artifact@v3
8686
with:
8787
name: pr_number
8888
path: ./pr_number

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
},
2525
"dependencies": {
2626
"@codesandbox/sandpack-react": "2.13.5",
27-
"@docsearch/css": "3.0.0-alpha.41",
28-
"@docsearch/react": "3.0.0-alpha.41",
27+
"@docsearch/css": "^3.6.1",
28+
"@docsearch/react": "^3.6.1",
2929
"@headlessui/react": "^1.7.0",
3030
"@radix-ui/react-context-menu": "^2.1.5",
3131
"body-scroll-lock": "^3.1.3",

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/components/Search.tsx

+11-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,17 @@ export function Search({
9494
onOpen,
9595
onClose,
9696
searchParameters = {
97-
hitsPerPage: 5,
97+
hitsPerPage: 30,
98+
attributesToHighlight: [
99+
'hierarchy.lvl0',
100+
'hierarchy.lvl1',
101+
'hierarchy.lvl2',
102+
'hierarchy.lvl3',
103+
'hierarchy.lvl4',
104+
'hierarchy.lvl5',
105+
'hierarchy.lvl6',
106+
'content',
107+
],
98108
},
99109
}: SearchProps) {
100110
useDocSearchKeyboardEvents({isOpen, onOpen, onClose});

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

+40-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,53 @@ October 18, 2024. In-person in Brussels, Belgium (hybrid event)
5535

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

38+
### reactjsday 2024 {/*reactjsday-2024*/}
39+
October 25, 2024. In-person in Verona, Italy + online (hybrid event)
40+
41+
[Website](https://2024.reactjsday.it/) - [Twitter](https://x.com/reactjsday) - [Facebook](https://www.facebook.com/GrUSP/) - [YouTube](https://www.youtube.com/c/grusp)
42+
43+
### React Advanced London 2024 {/*react-advanced-london-2024*/}
44+
October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
45+
46+
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
47+
48+
### React Summit US 2024 {/*react-summit-us-2024*/}
49+
November 19 & 22, 2024. In-person in New York, USA + online (hybrid event)
50+
51+
[Website](https://reactsummit.us/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
52+
5853
### React Africa 2024 {/*react-africa-2024*/}
5954
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
6055

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

58+
### React Day Berlin 2024 {/*react-day-berlin-2024*/}
59+
December 13 & 16, 2024. In-person in Berlin, Germany + remote (hybrid event)
60+
61+
[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin)
62+
6363
## Past Conferences {/*past-conferences*/}
6464

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

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+
>>>>>>> fe37c42e0b51167d7f3c98593f50de997d666266
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+
>>>>>>> fe37c42e0b51167d7f3c98593f50de997d666266
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+
The 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)

0 commit comments

Comments
 (0)