Skip to content

Commit 564b777

Browse files
authored
Merge pull request #530 from reactjs/sync-97489434
Sync with react.dev @ 9748943
2 parents 96c1010 + 91e7702 commit 564b777

26 files changed

+203
-114
lines changed

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Ignore this rule if you're specifically describing an experimental proposal. Mak
7979
- Use semicolons.
8080
- No space between function names and parens (`method() {}` not `method () {}`).
8181
- When in doubt, use the default style favored by [Prettier](https://prettier.io/playground/).
82+
- Always capitalize React concepts such as Hooks, Effects, and Transitions.
8283

8384
### Highlighting
8485

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"webpack-bundle-analyzer": "^4.5.0"
9898
},
9999
"engines": {
100-
"node": "^16.8.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
100+
"node": "^16.8.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0"
101101
},
102102
"nextBundleAnalysis": {
103103
"budget": null,

public/images/team/jack-pope.jpg

588 KB
Loading

src/content/community/acknowledgements.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ We'd like to recognize a few people who have made significant contributions to R
1616
* [Andreas Svensson](https://github.com/syranide)
1717
* [Alex Krolick](https://github.com/alexkrolick)
1818
* [Alexey Pyltsyn](https://github.com/lex111)
19+
* [Andrey Lunyov](https://github.com/alunyov)
1920
* [Brandon Dail](https://github.com/aweary)
2021
* [Brian Vaughn](https://github.com/bvaughn)
2122
* [Caleb Meredith](https://github.com/calebmer)

src/content/community/team.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ Current members of the React team are listed in alphabetical order below.
1818
Andrew got started with web development by making sites with WordPress, and eventually tricked himself into doing JavaScript. His favorite pastime is karaoke. Andrew is either a Disney villain or a Disney princess, depending on the day.
1919
</TeamMember>
2020

21-
<TeamMember name="Andrey Lunyov" permalink="andrey-lunyov" photo="/images/team/andrey-lunyov.jpg" github="alunyov" twitter="alunyov" threads="alunyov" title="Engineer at Meta">
22-
Andrey started his career as a designer and then gradually transitioned into web development. After joining the React Data team at Meta he worked on adding an incremental JavaScript compiler to Relay, and then later on, worked on removing the same compiler from Relay. Outside of work, Andrey likes to play music and engage in various sports.
23-
</TeamMember>
24-
2521
<TeamMember name="Dan Abramov" permalink="dan-abramov" photo="/images/team/gaearon.jpg" github="gaearon" twitter="dan_abramov2" title="Independent Engineer">
2622
Dan got into programming after he accidentally discovered Visual Basic inside Microsoft PowerPoint. He has found his true calling in turning [Sebastian](#sebastian-markbåge)'s tweets into long-form blog posts. Dan occasionally wins at Fortnite by hiding in a bush until the game ends.
2723
</TeamMember>
@@ -30,6 +26,10 @@ Current members of the React team are listed in alphabetical order below.
3026
Eli got into programming after he got suspended from middle school for hacking. He has been working on React and React Native since 2017. He enjoys eating treats, especially ice cream and apple pie. You can find Eli trying quirky activities like parkour, indoor skydiving, and aerial silks.
3127
</TeamMember>
3228

29+
<TeamMember name="Jack Pope" permalink="jack-pope" photo="/images/team/jack-pope.jpg" github="jackpope" personal="jackpope.me" title="Engineer at Meta">
30+
Shortly after being introduced to AutoHotkey, Jack had written scripts to automate everything he could think of. When reaching limitations there, he dove headfirst into web app development and hasn't looked back. Most recently, Jack worked on the web platform at Instagram before moving to React. His favorite programming language is JSX.
31+
</TeamMember>
32+
3333
<TeamMember name="Jason Bonta" permalink="jason-bonta" photo="/images/team/jasonbonta.jpg" threads="someextent" title="Engineering Manager at Meta">
3434
Jason likes having large volumes of Amazon packages delivered to the office so that he can build forts. Despite literally walling himself off from his team at times and not understanding how for-of loops work, we appreciate him for the unique qualities he brings to his work.
3535
</TeamMember>
@@ -74,7 +74,7 @@ Current members of the React team are listed in alphabetical order below.
7474
Sebastian majored in psychology. He's usually quiet. Even when he says something, it often doesn't make sense to the rest of us until a few months later. The correct way to pronounce his surname is "mark-boa-geh" but he settled for "mark-beige" out of pragmatism -- and that's how he approaches React.
7575
</TeamMember>
7676

77-
<TeamMember name="Sebastian Silbermann" permalink="sebastian-silbermann" photo="/images/team/sebsilbermann.jpg" github="eps1lon" twitter="sebsilbermann" threads="sebsilbermann" title="Independent Engineer">
77+
<TeamMember name="Sebastian Silbermann" permalink="sebastian-silbermann" photo="/images/team/sebsilbermann.jpg" github="eps1lon" twitter="sebsilbermann" threads="sebsilbermann" title="Engineer at Vercel">
7878
Sebastian learned programming to make the browser games he played during class more enjoyable. Eventually this lead to contributing to as much open source code as possible. Outside of coding he's busy making sure people don't confuse him with the other Sebastians and Zilberman of the React community.
7979
</TeamMember>
8080

src/content/learn/editor-setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Code linters find problems in your code as you write, helping you fix them early
4040

4141
### Formatting {/*formatting*/}
4242

43-
The last thing you want to do when sharing your code with another contributor is get into an discussion about [tabs vs spaces](https://www.google.com/search?q=tabs+vs+spaces)! Fortunately, [Prettier](https://prettier.io/) will clean up your code by reformatting it to conform to preset, configurable rules. Run Prettier, and all your tabs will be converted to spaces—and your indentation, quotes, etc will also all be changed to conform to the configuration. In the ideal setup, Prettier will run when you save your file, quickly making these edits for you.
43+
The last thing you want to do when sharing your code with another contributor is get into a discussion about [tabs vs spaces](https://www.google.com/search?q=tabs+vs+spaces)! Fortunately, [Prettier](https://prettier.io/) will clean up your code by reformatting it to conform to preset, configurable rules. Run Prettier, and all your tabs will be converted to spaces—and your indentation, quotes, etc will also all be changed to conform to the configuration. In the ideal setup, Prettier will run when you save your file, quickly making these edits for you.
4444

4545
You can install the [Prettier extension in VSCode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) by following these steps:
4646

src/content/learn/manipulating-the-dom-with-refs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ In general, you [don't want](/learn/referencing-values-with-refs#best-practices-
493493

494494
React sets `ref.current` during the commit. Before updating the DOM, React sets the affected `ref.current` values to `null`. After updating the DOM, React immediately sets them to the corresponding DOM nodes.
495495

496-
**Usually, you will access refs from event handlers.** If you want to do something with a ref, but there is no particular event to do it in, you might need an Effect. We will discuss effects on the next pages.
496+
**Usually, you will access refs from event handlers.** If you want to do something with a ref, but there is no particular event to do it in, you might need an Effect. We will discuss Effects on the next pages.
497497

498498
<DeepDive>
499499

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ textarea { display: block; margin-top: 5px; margin-bottom: 10px; }
330330

331331
<Pitfall>
332332

333-
**If you pass `value` without `onChange`, it will be impossible to type into the text area.** When you control an text area by passing some `value` to it, you *force* it to always have the value you passed. So if you pass a state variable as a `value` but forget to update that state variable synchronously during the `onChange` event handler, React will revert the text area after every keystroke back to the `value` that you specified.
333+
**If you pass `value` without `onChange`, it will be impossible to type into the text area.** When you control a text area by passing some `value` to it, you *force* it to always have the value you passed. So if you pass a state variable as a `value` but forget to update that state variable synchronously during the `onChange` event handler, React will revert the text area after every keystroke back to the `value` that you specified.
334334

335335
</Pitfall>
336336

src/content/reference/react-dom/flushSync.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Most of the time, `flushSync` can be avoided. Use `flushSync` as last resort.
5353

5454
* `flushSync` can significantly hurt performance. Use sparingly.
5555
* `flushSync` may force pending Suspense boundaries to show their `fallback` state.
56-
* `flushSync` may run pending effects and synchronously apply any updates they contain before returning.
56+
* `flushSync` may run pending Effects and synchronously apply any updates they contain before returning.
5757
* `flushSync` may flush updates outside the callback when necessary to flush the updates inside the callback. For example, if there are pending updates from a click, React may flush those before flushing the updates inside the callback.
5858

5959
---

src/content/reference/react-dom/preconnect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The `preconnect` function provides the browser with a hint that it should open a
5555
#### Caveats {/*caveats*/}
5656

5757
* Multiple calls to `preconnect` with the same server have the same effect as a single call.
58-
* In the browser, you can call `preconnect` in any situation: while rendering a component, in an effect, in an event handler, and so on.
58+
* In the browser, you can call `preconnect` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
5959
* In server-side rendering or when rendering Server Components, `preconnect` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
6060
* If you know the specific resources you'll need, you can call [other functions](/reference/react-dom/#resource-preloading-apis) instead that will start loading the resources right away.
6161
* There is no benefit to preconnecting to the same server the webpage itself is hosted from because it's already been connected to by the time the hint would be given.

src/content/reference/react-dom/prefetchDNS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The prefetchDNS function provides the browser with a hint that it should look up
5454
#### Caveats {/*caveats*/}
5555

5656
* Multiple calls to `prefetchDNS` with the same server have the same effect as a single call.
57-
* In the browser, you can call `prefetchDNS` in any situation: while rendering a component, in an effect, in an event handler, and so on.
57+
* In the browser, you can call `prefetchDNS` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
5858
* In server-side rendering or when rendering Server Components, `prefetchDNS` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
5959
* If you know the specific resources you'll need, you can call [other functions](/reference/react-dom/#resource-preloading-apis) instead that will start loading the resources right away.
6060
* There is no benefit to prefetching the same server the webpage itself is hosted from because it's already been looked up by the time the hint would be given.

src/content/reference/react-dom/preinit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The `preinit` function provides the browser with a hint that it should start dow
6767
#### Caveats {/*caveats*/}
6868

6969
* Multiple calls to `preinit` with the same `href` have the same effect as a single call.
70-
* In the browser, you can call `preinit` in any situation: while rendering a component, in an effect, in an event handler, and so on.
70+
* In the browser, you can call `preinit` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
7171
* In server-side rendering or when rendering Server Components, `preinit` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7272

7373
---

src/content/reference/react-dom/preinitModule.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The `preinitModule` function provides the browser with a hint that it should sta
6565
#### Caveats {/*caveats*/}
6666

6767
* Multiple calls to `preinitModule` with the same `href` have the same effect as a single call.
68-
* In the browser, you can call `preinitModule` in any situation: while rendering a component, in an effect, in an event handler, and so on.
68+
* In the browser, you can call `preinitModule` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
6969
* In server-side rendering or when rendering Server Components, `preinitModule` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7070

7171
---

src/content/reference/react-dom/preload.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The `preload` function provides the browser with a hint that it should start dow
7272
* Multiple equivalent calls to `preload` have the same effect as a single call. Calls to `preload` are considered equivalent according to the following rules:
7373
* Two calls are equivalent if they have the same `href`, except:
7474
* If `as` is set to `image`, two calls are equivalent if they have the same `href`, `imageSrcSet`, and `imageSizes`.
75-
* In the browser, you can call `preload` in any situation: while rendering a component, in an effect, in an event handler, and so on.
75+
* In the browser, you can call `preload` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
7676
* In server-side rendering or when rendering Server Components, `preload` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7777

7878
---

src/content/reference/react-dom/preloadModule.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The `preloadModule` function provides the browser with a hint that it should sta
6666
#### Caveats {/*caveats*/}
6767

6868
* Multiple calls to `preloadModule` with the same `href` have the same effect as a single call.
69-
* In the browser, you can call `preloadModule` in any situation: while rendering a component, in an effect, in an event handler, and so on.
69+
* In the browser, you can call `preloadModule` in any situation: while rendering a component, in an Effect, in an event handler, and so on.
7070
* In server-side rendering or when rendering Server Components, `preloadModule` only has an effect if you call it while rendering a component or in an async context originating from rendering a component. Any other calls will be ignored.
7171

7272
---

src/content/reference/react/Profiler.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function onRender(id, phase, actualDuration, baseDuration, startTime, commitTime
5454
#### Parameters {/*onrender-parameters*/}
5555

5656
* `id`: The string `id` prop of the `<Profiler>` tree that has just committed. This lets you identify which part of the tree was committed if you are using multiple profilers.
57-
* `phase`: `"mount"`, `"update"` or `"nested-update"`. This lets you know whether the tree has just been mounted for the first time or re-rendered due to a change in props, state, or hooks.
57+
* `phase`: `"mount"`, `"update"` or `"nested-update"`. This lets you know whether the tree has just been mounted for the first time or re-rendered due to a change in props, state, or Hooks.
5858
* `actualDuration`: The number of milliseconds spent rendering the `<Profiler>` and its descendants for the current update. This indicates how well the subtree makes use of memoization (e.g. [`memo`](/reference/react/memo) and [`useMemo`](/reference/react/useMemo)). Ideally this value should decrease significantly after the initial mount as many of the descendants will only need to re-render if their specific props change.
5959
* `baseDuration`: The number of milliseconds estimating how much time it would take to re-render the entire `<Profiler>` subtree without any optimizations. It is calculated by summing up the most recent render durations of each component in the tree. This value estimates a worst-case cost of rendering (e.g. the initial mount or a tree with no memoization). Compare `actualDuration` against it to see if memoization is working.
6060
* `startTime`: A numeric timestamp for when React began rendering the current update.

0 commit comments

Comments
 (0)