From 391dadb993d43c6bd15d9ebfdfc3adeb16d52094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=A9=EA=B8=B0=ED=98=84?= <102677317+kihyeoon@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:54:02 +0900 Subject: [PATCH 1/6] Fix typos in lazy.md and cache.md (#7141) --- src/content/reference/react/cache.md | 4 ++-- src/content/reference/react/lazy.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/reference/react/cache.md b/src/content/reference/react/cache.md index 0e56e3ef0..099d1c6f1 100644 --- a/src/content/reference/react/cache.md +++ b/src/content/reference/react/cache.md @@ -226,7 +226,7 @@ By caching a long-running data fetch, you can kick off asynchronous work prior t ```jsx [[2, 6, "await getUser(id)"], [1, 17, "getUser(id)"]] const getUser = cache(async (id) => { return await db.user.query(id); -}) +}); async function Profile({id}) { const user = await getUser(id); @@ -327,7 +327,7 @@ In general, you should use [`useMemo`](/reference/react/useMemo) for caching a e 'use client'; function WeatherReport({record}) { - const avgTemp = useMemo(() => calculateAvg(record)), record); + const avgTemp = useMemo(() => calculateAvg(record), record); // ... } diff --git a/src/content/reference/react/lazy.md b/src/content/reference/react/lazy.md index db99daa11..5ec74d0d9 100644 --- a/src/content/reference/react/lazy.md +++ b/src/content/reference/react/lazy.md @@ -78,7 +78,7 @@ Now that your component's code loads on demand, you also need to specify what sh }>

Preview

-
+ ``` 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: From cd923d6895c2fc64bc835851a1e3ec2e4234b3aa Mon Sep 17 00:00:00 2001 From: JiashengWu Date: Sat, 7 Sep 2024 01:10:14 +0800 Subject: [PATCH 2/6] Update conferences.md to move the past conferences lower (#7130) --- src/content/community/conferences.md | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md index 3e2d76060..c1bd7967f 100644 --- a/src/content/community/conferences.md +++ b/src/content/community/conferences.md @@ -10,26 +10,6 @@ Do you know of a local React.js conference? Add it here! (Please keep the list c ## Upcoming Conferences {/*upcoming-conferences*/} -### React Nexus 2024 {/*react-nexus-2024*/} -July 04 & 05, 2024. Bangalore, India (In-person event) - -[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in) - -### Chain React 2024 {/*chain-react-2024*/} -July 17-19, 2024. In-person in Portland, OR, USA - -[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf) - -### The Geek Conf 2024 {/*the-geek-conf-2024*/} -July 25, 2024. In-person in Berlin, Germany + remote (hybrid event) - -[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf) - -### React Rally 2024 πŸ™ {/*react-rally-2024*/} -August 12-13, 2024. Park City, UT, USA - -[Website](https://reactrally.com) - [Twitter](https://twitter.com/ReactRally) - [YouTube](https://www.youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw) - ### React Universe Conf 2024 {/*react-universe-conf-2024*/} September 5-6, 2024. WrocΕ‚aw, Poland. @@ -67,6 +47,26 @@ November 29, 2024. In-person in Casablanca, Morocco (hybrid event) ## Past Conferences {/*past-conferences*/} +### React Rally 2024 πŸ™ {/*react-rally-2024*/} +August 12-13, 2024. Park City, UT, USA + +[Website](https://reactrally.com) - [Twitter](https://twitter.com/ReactRally) - [YouTube](https://www.youtube.com/channel/UCXBhQ05nu3L1abBUGeQ0ahw) + +### The Geek Conf 2024 {/*the-geek-conf-2024*/} +July 25, 2024. In-person in Berlin, Germany + remote (hybrid event) + +[Website](https://thegeekconf.com) - [Twitter](https://twitter.com/thegeekconf) + +### Chain React 2024 {/*chain-react-2024*/} +July 17-19, 2024. In-person in Portland, OR, USA + +[Website](https://chainreactconf.com) - [Twitter](https://twitter.com/ChainReactConf) + +### React Nexus 2024 {/*react-nexus-2024*/} +July 04 & 05, 2024. Bangalore, India (In-person event) + +[Website](https://reactnexus.com/) - [Twitter](https://twitter.com/ReactNexus) - [Linkedin](https://www.linkedin.com/company/react-nexus) - [YouTube](https://www.youtube.com/reactify_in) + ### React Summit 2024 {/*react-summit-2024*/} June 14 & 18, 2024. In-person in Amsterdam, Netherlands + remote (hybrid event) From 2c0627277fb00b2772f636d142aa41e6265aeae6 Mon Sep 17 00:00:00 2001 From: Denis Urban Date: Fri, 6 Sep 2024 20:14:00 +0300 Subject: [PATCH 3/6] add React Day Berlin 2024 to conferences.md (#7137) --- src/content/community/conferences.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md index c1bd7967f..cd1c87993 100644 --- a/src/content/community/conferences.md +++ b/src/content/community/conferences.md @@ -45,6 +45,11 @@ November 29, 2024. In-person in Casablanca, Morocco (hybrid event) [Website](https://react-africa.com/) - [Twitter](https://x.com/BeJS_) +### React Day Berlin 2024 {/*react-day-berlin-2024*/} +December 13 & 16, 2024. In-person in Berlin, Germany + remote (hybrid event) + +[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin) + ## Past Conferences {/*past-conferences*/} ### React Rally 2024 πŸ™ {/*react-rally-2024*/} From 60ef58c98253fed44ea63c7b9f54168fb7a4e487 Mon Sep 17 00:00:00 2001 From: Oleg Komissarov Date: Fri, 6 Sep 2024 19:18:07 +0200 Subject: [PATCH 4/6] Update conferences.md, add conference (#7135) * Update conferences.md, add conference * Update conferences.md --------- Co-authored-by: Eli White --- src/content/community/conferences.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/content/community/conferences.md b/src/content/community/conferences.md index cd1c87993..cd0862b19 100644 --- a/src/content/community/conferences.md +++ b/src/content/community/conferences.md @@ -40,6 +40,11 @@ October 25 & 28, 2024. In-person in London, UK + online (hybrid event) [Website](https://reactadvanced.com/) - [Twitter](https://x.com/reactadvanced) +### React Summit US 2024 {/*react-summit-us-2024*/} +November 19 & 22, 2024. In-person in New York, USA + online (hybrid event) + +[Website](https://reactsummit.us/) - [Twitter](https://twitter.com/reactsummit) - [Videos](https://portal.gitnation.org/) + ### React Africa 2024 {/*react-africa-2024*/} November 29, 2024. In-person in Casablanca, Morocco (hybrid event) From 9aa2e3668da290f92f8997a25f28bd3f58b2a26d Mon Sep 17 00:00:00 2001 From: TinoM <151432822+Tinttori@users.noreply.github.com> Date: Sun, 8 Sep 2024 04:23:09 +0300 Subject: [PATCH 5/6] =?UTF-8?q?Changed=20the=20documentation=20of=20the=20?= =?UTF-8?q?subscribe=20argument=20to=20a=20more=20accurat=E2=80=A6=20(#669?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Changed the documentation of the subscribe argument to a more accurate one. * Update useSyncExternalStore.md --------- Co-authored-by: Sophie Alpert --- src/content/reference/react/useSyncExternalStore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react/useSyncExternalStore.md b/src/content/reference/react/useSyncExternalStore.md index 481690d7e..05e0c0831 100644 --- a/src/content/reference/react/useSyncExternalStore.md +++ b/src/content/reference/react/useSyncExternalStore.md @@ -41,7 +41,7 @@ It returns the snapshot of the data in the store. You need to pass two functions #### Parameters {/*parameters*/} -* `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. +* `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. * `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. From 092e30a5d702b0a73baea0f59502b0180ec21e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A3=A8=EB=B0=80LuMir?= Date: Mon, 9 Sep 2024 16:45:52 +0900 Subject: [PATCH 6/6] docs(conflict): resolve conflicts --- src/content/reference/react/useSyncExternalStore.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/content/reference/react/useSyncExternalStore.md b/src/content/reference/react/useSyncExternalStore.md index a18bec430..9c2d07dba 100644 --- a/src/content/reference/react/useSyncExternalStore.md +++ b/src/content/reference/react/useSyncExternalStore.md @@ -40,13 +40,9 @@ store에 μžˆλŠ” λ°μ΄ν„°μ˜ μŠ€λƒ…μƒ·μ„ λ°˜ν™˜ν•©λ‹ˆλ‹€. 두 개의 ν•¨μˆ˜λ₯Ό #### λ§€κ°œλ³€μˆ˜ {/*parameters*/} -* `subscribe`: ν•˜λ‚˜μ˜ `callback` 인수λ₯Ό λ°›μ•„ store에 κ΅¬λ…ν•˜λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€. μŠ€ν† μ–΄κ°€ λ³€κ²½λ˜λ©΄ 제곡된 `callback`을 ν˜ΈμΆœν•΄μ•Ό ν•©λ‹ˆλ‹€. 그러면 μ»΄ν¬λ„ŒνŠΈκ°€ λ¦¬λ Œλ”λ§λ©λ‹ˆλ‹€. subscribe ν•¨μˆ˜λŠ” ꡬ독을 μ •λ¦¬ν•˜λŠ” ν•¨μˆ˜λ₯Ό λ°˜ν™˜ν•΄μ•Ό ν•©λ‹ˆλ‹€. +* `subscribe`: ν•˜λ‚˜μ˜ `callback` 인수λ₯Ό λ°›μ•„ store에 κ΅¬λ…ν•˜λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€. storeκ°€ 변경될 λ•Œ, 제곡된 `callback`이 ν˜ΈμΆœλ˜μ–΄ Reactκ°€ `getSnapshot`을 λ‹€μ‹œ ν˜ΈμΆœν•˜κ³  (ν•„μš”ν•œ 경우) μ»΄ν¬λ„ŒνŠΈλ₯Ό λ‹€μ‹œ λ Œλ”λ§ν•˜λ„λ‘ ν•΄μ•Ό ν•©λ‹ˆλ‹€. `subscribe` ν•¨μˆ˜λŠ” ꡬ독을 μ •λ¦¬ν•˜λŠ” ν•¨μˆ˜λ₯Ό λ°˜ν™˜ν•΄μ•Ό ν•©λ‹ˆλ‹€. -<<<<<<< HEAD -* `getSnapshot`: μ»΄ν¬λ„ŒνŠΈμ— ν•„μš”ν•œ store λ°μ΄ν„°μ˜ μŠ€λƒ…μƒ·μ„ λ°˜ν™˜ν•˜λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€. μŠ€ν† μ–΄κ°€ λ³€κ²½λ˜μ§€ μ•Šμ€ μƒνƒœμ—μ„œ `getSnapshot`을 반볡적으둜 ν˜ΈμΆœν•˜λ©΄ λ™μΌν•œ 값을 λ°˜ν™˜ν•΄μ•Ό ν•©λ‹ˆλ‹€. μ €μž₯μ†Œκ°€ λ³€κ²½λ˜μ–΄ λ°˜ν™˜λœ 값이 λ‹€λ₯΄λ©΄ ([`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is)와 λΉ„κ΅ν•˜μ—¬) ReactλŠ” μ»΄ν¬λ„ŒνŠΈλ₯Ό λ¦¬λ Œλ”λ§ν•©λ‹ˆλ‹€. -======= -* `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. ->>>>>>> 9aa2e3668da290f92f8997a25f28bd3f58b2a26d +* `getSnapshot`: μ»΄ν¬λ„ŒνŠΈμ— ν•„μš”ν•œ store λ°μ΄ν„°μ˜ μŠ€λƒ…μƒ·μ„ λ°˜ν™˜ν•˜λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€. storeκ°€ λ³€κ²½λ˜μ§€ μ•Šμ€ μƒνƒœμ—μ„œ `getSnapshot`을 반볡적으둜 ν˜ΈμΆœν•˜λ©΄ λ™μΌν•œ 값을 λ°˜ν™˜ν•΄μ•Ό ν•©λ‹ˆλ‹€. μ €μž₯μ†Œκ°€ λ³€κ²½λ˜μ–΄ λ°˜ν™˜λœ 값이 λ‹€λ₯΄λ©΄ ([`Object.is`](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Object/is)와 λΉ„κ΅ν•˜μ—¬) ReactλŠ” μ»΄ν¬λ„ŒνŠΈλ₯Ό λ¦¬λ Œλ”λ§ν•©λ‹ˆλ‹€. * **optional** `getServerSnapshot`: store에 μžˆλŠ” λ°μ΄ν„°μ˜ 초기 μŠ€λƒ…μƒ·μ„ λ°˜ν™˜ν•˜λŠ” ν•¨μˆ˜μž…λ‹ˆλ‹€. μ„œλ²„ λ Œλ”λ§ 도쀑과 ν΄λΌμ΄μ–ΈνŠΈμ—μ„œ μ„œλ²„ λ Œλ”λ§ 된 μ½˜ν…μΈ μ˜ ν•˜μ΄λ“œλ ˆμ΄μ…˜ μ€‘μ—λ§Œ μ‚¬μš©λ©λ‹ˆλ‹€. μ„œλ²„ μŠ€λƒ…μƒ·μ€ ν΄λΌμ΄μ–ΈνŠΈμ™€ μ„œλ²„ 간에 동일해야 ν•˜λ©° 일반적으둜 μ§λ ¬ν™”λ˜μ–΄ μ„œλ²„μ—μ„œ ν΄λΌμ΄μ–ΈνŠΈλ‘œ μ „λ‹¬λ©λ‹ˆλ‹€. 이 ν•¨μˆ˜κ°€ μ œκ³΅λ˜μ§€ μ•ŠμœΌλ©΄ μ„œλ²„μ—μ„œ μ»΄ν¬λ„ŒνŠΈλ₯Ό λ Œλ”λ§ν•  λ•Œ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.