Skip to content

Commit 6e03f07

Browse files
authored
Merge pull request #69 from reactjs/sync-fe37c42e
Sync with react.dev @ fe37c42
2 parents 5ac48f9 + f5d703e commit 6e03f07

20 files changed

Lines changed: 1285 additions & 1093 deletions

File tree

.github/workflows/analyze.yml

Lines changed: 6 additions & 6 deletions
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/npm-install@v1.7.10
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 nextjs-bundle-analysis@0.5.0 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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 11 additions & 1 deletion
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/community/conferences.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ 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+
<<<<<<< HEAD
1314
### React Paris 2024 {/*react-paris-2024*/}
1415
March 22, 2024. In-person in Paris, France + Remote (hybrid)
1516

@@ -82,6 +83,8 @@ July 25, 2024. In-person in Berlin, Germany + remote (hybrid event)
8283

8384
[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf)
8485

86+
=======
87+
>>>>>>> fe37c42e0b51167d7f3c98593f50de997d666266
8588
### React Universe Conf 2024 {/*react-universe-conf-2024*/}
8689
September 5-6, 2024. Wrocław, Poland.
8790

@@ -102,8 +105,78 @@ October 17 - 19, 2024. In-person in Goa, India (hybrid event) + Oct 15 2024 - re
102105

103106
[Website](https://www.reactindia.io) - [Twitter](https://twitter.com/react_india) - [Facebook](https://www.facebook.com/ReactJSIndia) - [Youtube](https://www.youtube.com/channel/UCaFbHCBkPvVv1bWs_jwYt3w)
104107

108+
<<<<<<< HEAD
105109
## Past Conferences {/*past-conferences*/}
106110

111+
=======
112+
### React Brussels 2024 {/*react-brussels-2024*/}
113+
October 18, 2024. In-person in Brussels, Belgium (hybrid event)
114+
115+
[Website](https://www.react.brussels/) - [Twitter](https://x.com/BrusselsReact)
116+
117+
### reactjsday 2024 {/*reactjsday-2024*/}
118+
October 25, 2024. In-person in Verona, Italy + online (hybrid event)
119+
120+
[Website](https://2024.reactjsday.it/) - [Twitter](https://x.com/reactjsday) - [Facebook](https://www.facebook.com/GrUSP/) - [YouTube](https://www.youtube.com/c/grusp)
121+
122+
### React Advanced London 2024 {/*react-advanced-london-2024*/}
123+
October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
124+
125+
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
126+
127+
### React Summit US 2024 {/*react-summit-us-2024*/}
128+
November 19 & 22, 2024. In-person in New York, USA + online (hybrid event)
129+
130+
[Website](https://reactsummit.us/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
131+
132+
### React Africa 2024 {/*react-africa-2024*/}
133+
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
134+
135+
[Website](https://react-africa.com/) - [Twitter](https://x.com/BeJS_)
136+
137+
### React Day Berlin 2024 {/*react-day-berlin-2024*/}
138+
December 13 & 16, 2024. In-person in Berlin, Germany + remote (hybrid event)
139+
140+
[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin)
141+
142+
## Past Conferences {/*past-conferences*/}
143+
144+
### React Rally 2024 🐙 {/*react-rally-2024*/}
145+
August 12-13, 2024. Park City, UT, USA
146+
147+
[Website](https://reactrally.com) - [Twitter](https://twitter.com/ReactRally) - [YouTube](https://www.youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw)
148+
149+
### The Geek Conf 2024 {/*the-geek-conf-2024*/}
150+
July 25, 2024. In-person in Berlin, Germany + remote (hybrid event)
151+
152+
[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf)
153+
154+
### Chain React 2024 {/*chain-react-2024*/}
155+
July 17-19, 2024. In-person in Portland, OR, USA
156+
157+
[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf)
158+
159+
### React Nexus 2024 {/*react-nexus-2024*/}
160+
July 04 & 05, 2024. Bangalore, India (In-person event)
161+
162+
[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)
163+
164+
### React Summit 2024 {/*react-summit-2024*/}
165+
June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event)
166+
167+
[Website](https://reactsummit.com/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
168+
169+
### React Norway 2024 {/*react-norway-2024*/}
170+
June 14, 2024. In-person at Farris Bad Hotel in Larvik, Norway and online (hybrid event).
171+
172+
[Website](https://reactnorway.com/) - [Twitter](https://twitter.com/ReactNorway)
173+
174+
### Render(ATL) 2024 🍑 {/*renderatl-2024-*/}
175+
June 12 - June 14, 2024. Atlanta, GA, USA
176+
177+
[Website](https://renderatl.com) - [Discord](https://www.renderatl.com/discord) - [Twitter](https://twitter.com/renderATL) - [Instagram](https://www.instagram.com/renderatl/) - [Facebook](https://www.facebook.com/renderatl/) - [LinkedIn](https://www.linkedin.com/company/renderatl) - [Podcast](https://www.renderatl.com/culture-and-code#/)
178+
179+
>>>>>>> fe37c42e0b51167d7f3c98593f50de997d666266
107180
### Frontend Nation 2024 {/*frontend-nation-2024*/}
108181
June 4 - 7, 2024. Online
109182

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ function Game() {
408408
409409
There are two problems with this code.
410410
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.
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
413413
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

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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:

0 commit comments

Comments
 (0)