Skip to content

Commit c63d3b5

Browse files
authored
Merge branch 'main' into sync-c2d61310
2 parents 36ef0ea + 6e03f07 commit c63d3b5

18 files changed

Lines changed: 1272 additions & 1160 deletions

.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: 62 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -10,117 +10,110 @@ 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)
13+
### React Universe Conf 2024 {/*react-universe-conf-2024*/}
14+
September 5-6, 2024. Wrocław, Poland.
1515

16-
[Website](https://react.paris/) - [Twitter](https://twitter.com/BeJS_) - [LinkedIn](https://www.linkedin.com/events/7150816372074192900/comments/)
16+
[Website](https://www.reactuniverseconf.com/) - [Twitter](https://twitter.com/react_native_eu) - [LinkedIn](https://www.linkedin.com/events/reactuniverseconf7163919537074118657/)
1717

18-
### Epic Web Conf 2024 {/*epic-web-2024*/}
19-
April 10 - 11, 2024. In-person in Park City, UT, USA
18+
### React Alicante 2024 {/*react-alicante-2024*/}
19+
September 19-21, 2024. Alicante, Spain.
2020

21-
[Website](https://www.epicweb.dev/conf) - [YouTube](https://www.youtube.com/@EpicWebDev)
21+
[Website](https://reactalicante.es/) - [Twitter](https://twitter.com/ReactAlicante) - [YouTube](https://www.youtube.com/channel/UCaSdUaITU1Cz6PvC97A7e0w)
2222

23-
### React Miami 2024 {/*react-miami-2024*/}
24-
April 19 - 20, 2024. In-person in Miami, FL, USA
23+
### RenderCon Kenya 2024 {/*rendercon-kenya-2024*/}
24+
October 04 - 05, 2024. Nairobi, Kenya
2525

26-
[Website](https://reactmiami.com/) - [Twitter](https://twitter.com/ReactMiamiConf)
26+
[Website](https://rendercon.org/) - [Twitter](https://twitter.com/renderconke) - [LinkedIn](https://www.linkedin.com/company/renderconke/) - [YouTube](https://www.youtube.com/channel/UC0bCcG8gHUL4njDOpQGcMIA)
2727

28-
### React Connection 2024 {/*react-connection-2024*/}
29-
April 22, 2024. In-person in Paris, France
28+
### React India 2024 {/*react-india-2024*/}
29+
October 17 - 19, 2024. In-person in Goa, India (hybrid event) + Oct 15 2024 - remote day
3030

31-
[Website](https://reactconnection.io/) - [Twitter](https://twitter.com/ReactConn)
31+
[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)
3232

33-
### React Native Connection 2024 {/*react-native-connection-2024*/}
34-
April 23, 2024. In-person in Paris, France
33+
### React Brussels 2024 {/*react-brussels-2024*/}
34+
October 18, 2024. In-person in Brussels, Belgium (hybrid event)
3535

36-
[Website](https://reactnativeconnection.io/) - [Twitter](https://twitter.com/ReactNativeConn)
36+
[Website](https://www.react.brussels/) - [Twitter](https://x.com/BrusselsReact)
3737

38-
### React Conf 2024 {/*react-conf-2024*/}
39-
May 15 - 16, 2024. In-person in Henderson, NV, USA + remote
38+
### React Advanced London 2024 {/*react-advanced-london-2024*/}
39+
October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
4040

41-
[Website](https://conf.react.dev) - [Twitter](https://twitter.com/reactjs)
41+
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
4242

43-
### App.js Conf 2024 {/*appjs-conf-2024*/}
44-
May 22 - 24, 2024. In-person in Kraków, Poland + remote
43+
### React Africa 2024 {/*react-africa-2024*/}
44+
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
4545

46-
[Website](https://appjs.co) - [Twitter](https://twitter.com/appjsconf)
46+
[Website](https://react-africa.com/) - [Twitter](https://x.com/BeJS_)
4747

48+
## Past Conferences {/*past-conferences*/}
4849

49-
### Frontend Nation 2024 {/*frontend-nation-2024*/}
50-
June 4 - 7, 2024. Online
50+
=======
51+
### React Brussels 2024 {/*react-brussels-2024*/}
52+
October 18, 2024. In-person in Brussels, Belgium (hybrid event)
5153

52-
[Website](https://frontendnation.com/) - [Twitter](https://twitter.com/frontendnation)
54+
[Website](https://www.react.brussels/) - [Twitter](https://x.com/BrusselsReact)
5355

54-
### React Summit 2024 {/*react-summit-2024*/}
55-
June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event)
56+
### reactjsday 2024 {/*reactjsday-2024*/}
57+
October 25, 2024. In-person in Verona, Italy + online (hybrid event)
5658

57-
[Website](https://reactsummit.com/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
59+
[Website](https://2024.reactjsday.it/) - [Twitter](https://x.com/reactjsday) - [Facebook](https://www.facebook.com/GrUSP/) - [YouTube](https://www.youtube.com/c/grusp)
5860

59-
### Render(ATL) 2024 🍑 {/*renderatl-2024-*/}
60-
June 12 - June 14, 2024. Atlanta, GA, USA
61+
### React Advanced London 2024 {/*react-advanced-london-2024*/}
62+
October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
6163

62-
[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#/)
64+
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
6365

64-
### React Norway 2024 {/*react-norway-2024*/}
65-
June 14, 2024. In-person at Farris Bad Hotel in Larvik, Norway and online (hybrid event).
66+
### React Summit US 2024 {/*react-summit-us-2024*/}
67+
November 19 & 22, 2024. In-person in New York, USA + online (hybrid event)
6668

67-
[Website](https://reactnorway.com/) - [Twitter](https://twitter.com/ReactNorway)
69+
[Website](https://reactsummit.us/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
6870

71+
### React Africa 2024 {/*react-africa-2024*/}
72+
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
6973

70-
### React Nexus 2024 {/*react-nexus-2024*/}
71-
July 04 & 05, 2024. Bangalore, India (In-person event)
74+
[Website](https://react-africa.com/) - [Twitter](https://x.com/BeJS_)
7275

73-
[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)
76+
### React Day Berlin 2024 {/*react-day-berlin-2024*/}
77+
December 13 & 16, 2024. In-person in Berlin, Germany + remote (hybrid event)
7478

75-
### Chain React 2024 {/*chain-react-2024*/}
76-
July 17-19, 2024. In-person in Portland, OR, USA
79+
[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin)
7780

78-
[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf)
81+
## Past Conferences {/*past-conferences*/}
82+
83+
### React Rally 2024 🐙 {/*react-rally-2024*/}
84+
August 12-13, 2024. Park City, UT, USA
85+
86+
[Website](https://reactrally.com) - [Twitter](https://twitter.com/ReactRally) - [YouTube](https://www.youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw)
7987

8088
### The Geek Conf 2024 {/*the-geek-conf-2024*/}
8189
July 25, 2024. In-person in Berlin, Germany + remote (hybrid event)
8290

8391
[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf)
8492

85-
### React Universe Conf 2024 {/*react-universe-conf-2024*/}
86-
September 5-6, 2024. Wrocław, Poland.
87-
88-
[Website](https://www.reactuniverseconf.com/) - [Twitter](https://twitter.com/react_native_eu) - [LinkedIn](https://www.linkedin.com/events/reactuniverseconf7163919537074118657/)
89-
90-
### React Alicante 2024 {/*react-alicante-2024*/}
91-
September 19-21, 2024. Alicante, Spain.
92-
93-
[Website](https://reactalicante.es/) - [Twitter](https://twitter.com/ReactAlicante) - [YouTube](https://www.youtube.com/channel/UCaSdUaITU1Cz6PvC97A7e0w)
94-
95-
### RenderCon Kenya 2024 {/*rendercon-kenya-2024*/}
96-
October 04 - 05, 2024. Nairobi, Kenya
97-
98-
[Website](https://rendercon.org/) - [Twitter](https://twitter.com/renderconke) - [LinkedIn](https://www.linkedin.com/company/renderconke/) - [YouTube](https://www.youtube.com/channel/UC0bCcG8gHUL4njDOpQGcMIA)
93+
### Chain React 2024 {/*chain-react-2024*/}
94+
July 17-19, 2024. In-person in Portland, OR, USA
9995

100-
### React India 2024 {/*react-india-2024*/}
101-
October 17 - 19, 2024. In-person in Goa, India (hybrid event) + Oct 15 2024 - remote day
96+
[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf)
10297

103-
[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)
98+
### React Nexus 2024 {/*react-nexus-2024*/}
99+
July 04 & 05, 2024. Bangalore, India (In-person event)
104100

105-
<<<<<<< HEAD
106-
=======
107-
### React Brussels 2024 {/*react-brussels-2024*/}
108-
October 18, 2024. In-person in Brussels, Belgium (hybrid event)
101+
[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in)
109102

110-
[Website](https://www.react.brussels/) - [Twitter](https://x.com/BrusselsReact)
103+
### React Summit 2024 {/*react-summit-2024*/}
104+
June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event)
111105

112-
### React Advanced London 2024 {/*react-advanced-london-2024*/}
113-
October 25 & 28, 2024. In-person in London, UK + online (hybrid event)
106+
[Website](https://reactsummit.com/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/)
114107

115-
[Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced)
108+
### React Norway 2024 {/*react-norway-2024*/}
109+
June 14, 2024. In-person at Farris Bad Hotel in Larvik, Norway and online (hybrid event).
116110

117-
### React Africa 2024 {/*react-africa-2024*/}
118-
November 29, 2024. In-person in Casablanca, Morocco (hybrid event)
111+
[Website](https://reactnorway.com/) - [Twitter](https://twitter.com/ReactNorway)
119112

120-
[Website](https://react-africa.com/) - [Twitter](https://x.com/BeJS_)
113+
### Render(ATL) 2024 🍑 {/*renderatl-2024-*/}
114+
June 12 - June 14, 2024. Atlanta, GA, USA
121115

122-
>>>>>>> c2d61310664cc0d94f89ca21fc1d44e674329799
123-
## Past Conferences {/*past-conferences*/}
116+
[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#/)
124117

125118
### Frontend Nation 2024 {/*frontend-nation-2024*/}
126119
June 4 - 7, 2024. Online

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/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/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:

src/content/reference/react/useCallback.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ function ChatRoom({ roomId }) {
711711

712712
useEffect(() => {
713713
const options = createOptions();
714-
const connection = createConnection();
714+
const connection = createConnection(options);
715715
connection.connect();
716716
// ...
717717
```
@@ -722,7 +722,7 @@ This creates a problem. [Every reactive value must be declared as a dependency o
722722
```js {6}
723723
useEffect(() => {
724724
const options = createOptions();
725-
const connection = createConnection();
725+
const connection = createConnection(options);
726726
connection.connect();
727727
return () => connection.disconnect();
728728
}, [createOptions]); // 🔴 Problem: This dependency changes on every render
@@ -744,7 +744,7 @@ function ChatRoom({ roomId }) {
744744

745745
useEffect(() => {
746746
const options = createOptions();
747-
const connection = createConnection();
747+
const connection = createConnection(options);
748748
connection.connect();
749749
return () => connection.disconnect();
750750
}, [createOptions]); // ✅ Only changes when createOptions changes
@@ -766,7 +766,7 @@ function ChatRoom({ roomId }) {
766766
}
767767

768768
const options = createOptions();
769-
const connection = createConnection();
769+
const connection = createConnection(options);
770770
connection.connect();
771771
return () => connection.disconnect();
772772
}, [roomId]); // ✅ Only changes when roomId changes

0 commit comments

Comments
 (0)