Skip to content

Commit 9b9a51b

Browse files
authored
Merge pull request #46 from reactjs/sync-2390627c
Sync with react.dev @ 2390627
2 parents 8a2fa80 + 50cbffc commit 9b9a51b

File tree

14 files changed

+14
-38
lines changed

14 files changed

+14
-38
lines changed

public/images/team/dave-mccabe.jpg

-203 KB
Binary file not shown.

public/images/team/lunaruan.jpg

-150 KB
Binary file not shown.

public/images/team/mengdi-chen.jpg

-106 KB
Binary file not shown.

public/images/team/sean-keegan.jpg

-199 KB
Binary file not shown.

src/components/Layout/HomeContent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,8 +1665,8 @@ function LikeButton({video}) {
16651665
<button
16661666
data-hover="LikeButton"
16671667
className={cn(
1668-
'outline-none focus:bg-red-50/5 focus:text-red-50 relative flex items-center justify-center w-10 h-10 cursor-pointer rounded-full text-tertiary hover:bg-card active:scale-95 active:bg-red-50/5 active:text-red-50',
1669-
isLiked && 'text-red-50'
1668+
'outline-none focus:bg-red-50/5 focus:text-red-50 relative flex items-center justify-center w-10 h-10 cursor-pointer rounded-full hover:bg-card active:scale-95 active:bg-red-50/5 active:text-red-50',
1669+
isLiked ? 'text-red-50' : 'text-tertiary'
16701670
)}
16711671
aria-label={isLiked ? 'Poista tallennus' : 'Tallenna'}
16721672
onClick={() => {

src/components/Layout/Toc.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ export function Toc({headings}: {headings: Toc}) {
2727
<ul className="space-y-2 pb-16">
2828
{headings.length > 0 &&
2929
headings.map((h, i) => {
30-
if (h.url == null) {
31-
// TODO: only log in DEV
30+
if (!h.url && process.env.NODE_ENV === 'development') {
3231
console.error('Heading does not have URL');
3332
}
3433
return (

src/components/Seo.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@ const deployedTranslations = [
2121
'en',
2222
'zh-hans',
2323
'es',
24+
'fr',
2425
// We'll add more languages when they have enough content.
2526
// Please DO NOT edit this list without a discussion in the reactjs/react.dev repo.
2627
// It must be the same between all translations.
2728
];
2829

29-
let shouldPreventIndexing = false;
30-
if (
31-
siteConfig.languageCode !== 'en' &&
32-
!deployedTranslations.includes(siteConfig.languageCode)
33-
) {
34-
shouldPreventIndexing = true;
35-
}
36-
3730
function getDomain(languageCode: string): string {
3831
const subdomain = languageCode === 'en' ? '' : languageCode + '.';
3932
return subdomain + 'react.dev';
@@ -69,7 +62,6 @@ export const Seo = withRouter(
6962
href={canonicalUrl.replace(siteDomain, getDomain('en'))}
7063
hrefLang="x-default"
7164
/>
72-
{shouldPreventIndexing && <meta name="robots" content="noindex" />}
7365
{deployedTranslations.map((languageCode) => (
7466
<link
7567
key={'alt-' + languageCode}

src/content/community/acknowledgements.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ We'd like to recognize a few people who have made significant contributions to R
2424
* [Christoph Nakazawa](https://github.com/cpojer)
2525
* [Christopher Chedeau](https://github.com/vjeux)
2626
* [Clement Hoang](https://github.com/clemmy)
27+
* [Dave McCabe](https://github.com/davidmccabe)
2728
* [Dominic Gannaway](https://github.com/trueadm)
2829
* [Flarnie Marchan](https://github.com/flarnie)
2930
* [Jason Quense](https://github.com/jquense)
@@ -33,8 +34,10 @@ We'd like to recognize a few people who have made significant contributions to R
3334
* [Josh Duck](https://github.com/joshduck)
3435
* [Joe Critchley](https://github.com/joecritch)
3536
* [Jeff Morrison](https://github.com/jeffmo)
37+
* [Luna Ruan](https://github.com/lunaruan)
3638
* [Keyan Zhang](https://github.com/keyz)
3739
* [Marco Salazar](https://github.com/salazarm)
40+
* [Mengdi Chen](https://github.com/mondaychen)
3841
* [Nat Alison](https://github.com/tesseralis)
3942
* [Nathan Hunzaker](https://github.com/nhunzaker)
4043
* [Nicolas Gallagher](https://github.com/necolas)
@@ -45,7 +48,7 @@ We'd like to recognize a few people who have made significant contributions to R
4548
* [Robert Zhang](https://github.com/robertzhidealx)
4649
* [Sander Spies](https://github.com/sanderspies)
4750
* [Sasha Aickin](https://github.com/aickin)
48-
* [Seth Webster](https://github.com/sethwebster)
51+
* [Sean Keegan](https://github.com/seanryankeegan)
4952
* [Sophia Shoemaker](https://github.com/mrscobbler)
5053
* [Sunil Pai](https://github.com/threepointone)
5154
* [Tim Yung](https://github.com/yungsters)

src/content/community/team.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ Current members of the React team are listed in alphabetical order below.
2626
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.
2727
</TeamMember>
2828

29-
<TeamMember name="Dave McCabe" permalink="dave-mccabe" photo="/images/team/dave-mccabe.jpg" github="davidmccabe" twitter="mcc_abe" title="Engineer at Meta">
30-
An engineer by trade and outdoorsman at heart, David has long been an innovator in the field of programming-while-sunbathing. Besides surprising his colleagues with unique outdoor video-call backgrounds, he enjoys playing guitar (in sunlit meadows, of course) and martial arts (still indoors, gotta work on that).
31-
</TeamMember>
32-
3329
<TeamMember name="Eli White" permalink="eli-white" photo="/images/team/eli-white.jpg" github="TheSavior" twitter="Eli_White" title="Engineering Manager at Meta">
3430
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.
3531
</TeamMember>
@@ -54,10 +50,6 @@ Current members of the React team are listed in alphabetical order below.
5450
Lauren’s programming career peaked when she first discovered the `<marquee>` tag. She’s been chasing that high ever since. When she’s not adding bugs into React, she enjoys dropping cheeky memes in chat, and playing all too many video games with her partner, and her dog Zelda.
5551
</TeamMember>
5652

57-
<TeamMember name="Luna Ruan" permalink="luna-ruan" photo="/images/team/lunaruan.jpg" github="lunaruan" twitter="lunaruan" title="Independent Engineer">
58-
Luna learned programming because she thought it meant creating video games. Instead, she ended up working on the Pinterest web app, and now on React itself. Luna doesn't want to make video games anymore, but she plans to do creative writing if she ever gets bored.
59-
</TeamMember>
60-
6153
<TeamMember name="Luna Wei" permalink="luna-wei" photo="/images/team/luna-wei.jpg" github="lunaleaps" twitter="lunaleaps" title="Engineer at Meta">
6254
Luna first learnt the fundamentals of python at the age of 6 from her father. Since then, she has been unstoppable. Luna aspires to be a gen z, and the road to success is paved with environmental advocacy, urban gardening and lots of quality time with her Voo-Doo’d (as pictured).
6355
</TeamMember>
@@ -66,10 +58,6 @@ Current members of the React team are listed in alphabetical order below.
6658
Matt stumbled into coding, and since then, has become enamored with creating things in communities that can’t be created alone. Prior to React, he worked on YouTube, the Google Assistant, Fuchsia, and Google Cloud AI and Evernote. When he's not trying to make better developer tools he enjoys the mountains, jazz, and spending time with his family.
6759
</TeamMember>
6860

69-
<TeamMember name="Mengdi Chen" permalink="mengdi-chen" photo="/images/team/mengdi-chen.jpg" github="mondaychen" twitter="mengdi_en" title="Engineer at Meta">
70-
While working on his Digital Arts degree Mengdi was conceited about his front-end skills because his CSS worked perfectly even on IE6. But soon React opened a new door of programming for him, and he has been dreaming of joining the React team ever since. Outside of work, he is usually busy chasing his two kids around or collecting strange recipes.
71-
</TeamMember>
72-
7361
<TeamMember name="Mofei Zhang" permalink="mofei-zhang" photo="/images/team/mofei-zhang.png" github="mofeiZ" title="Engineer at Meta">
7462
Mofei started programming when she realized it can help her cheat in video games. She focused on operating systems in undergrad / grad school, but now finds herself happily tinkering on React. Outside of work, she enjoys debugging bouldering problems and planning her next backpacking trip(s).
7563
</TeamMember>
@@ -86,10 +74,6 @@ Current members of the React team are listed in alphabetical order below.
8674
Sathya hated the Dragon Book in school but somehow ended up working on compilers all his career. When he's not compiling React components, he's either drinking coffee or eating yet another Dosa.
8775
</TeamMember>
8876

89-
<TeamMember name="Sean Keegan" permalink="sean-keegan" photo="/images/team/sean-keegan.jpg" github="seanryankeegan" twitter="DevRelSean" title="Developer Advocate at Meta">
90-
After a first career as a math teacher, Sean remembered that one intro to comp sci class he had to take as a prereq and thought “that was kind of fun!”. One coding bootcamp and several tech jobs later, Sean discovered developer advocacy and hasn’t looked back. Outside of work, Sean enjoys ultimate frisbee, video games, and researching (but rarely implementing) better ways to care for his houseplants.
91-
</TeamMember>
92-
9377
<TeamMember name="Sebastian Markbåge" permalink="sebastian-markbåge" photo="/images/team/sebmarkbage.jpg" github="sebmarkbage" twitter="sebmarkbage" title="Engineer at Vercel">
9478
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.
9579
</TeamMember>

src/content/learn/passing-props-to-a-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export default function Gallery() {
462462
</li>
463463
<li>
464464
<b>Discovered: </b>
465-
polonium (element)
465+
polonium (chemical element)
466466
</li>
467467
</ul>
468468
</section>

src/content/learn/removing-effect-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ function ChatRoom() {
926926

927927
useEffect(() => {
928928
const options = createOptions();
929-
const connection = createConnection();
929+
const connection = createConnection(options);
930930
connection.connect();
931931
return () => connection.disconnect();
932932
}, []); // ✅ All dependencies declared

src/content/learn/state-a-components-memory.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,8 +1488,6 @@ Tässä on korjattu versio, joka käyttää tavallista `name` muuttujaa määrit
14881488
<Sandpack>
14891489

14901490
```js
1491-
import { useState } from 'react';
1492-
14931491
export default function FeedbackForm() {
14941492
function handleClick() {
14951493
const name = prompt('What is your name?');

src/content/reference/react/cache.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ canary: true
44
---
55

66
<Canary>
7-
* `cache` is only for use with [React Server Components](https://react.dev/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components). See [frameworks](https://react.dev/learn/start-a-new-react-project#bleeding-edge-react-frameworks) that support React Server Components.
7+
* `cache` is only for use with [React Server Components](/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components). See [frameworks](/learn/start-a-new-react-project#bleeding-edge-react-frameworks) that support React Server Components.
88

9-
* `cache` is only available in React’s [Canary](https://react.dev/community/versioning-policy#canary-channel) and [experimental](https://react.dev/community/versioning-policy#experimental-channel) channels. Please ensure you understand the limitations before using `cache` in production. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
9+
* `cache` is only available in React’s [Canary](/community/versioning-policy#canary-channel) and [experimental](/community/versioning-policy#experimental-channel) channels. Please ensure you understand the limitations before using `cache` in production. Learn more about [React's release channels here](/community/versioning-policy#all-release-channels).
1010
</Canary>
1111

1212
<Intro>
@@ -68,7 +68,7 @@ The optimization of caching return values based on inputs is known as [_memoizat
6868
- React will invalidate the cache for all memoized functions for each server request.
6969
- Each call to `cache` creates a new function. This means that calling `cache` with the same function multiple times will return different memoized functions that do not share the same cache.
7070
- `cachedFn` will also cache errors. If `fn` throws an error for certain arguments, it will be cached, and the same error is re-thrown when `cachedFn` is called with those same arguments.
71-
- `cache` is for use in [Server Components](https://react.dev/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components) only.
71+
- `cache` is for use in [Server Components](/blog/2023/03/22/react-labs-what-we-have-been-working-on-march-2023#react-server-components) only.
7272

7373
---
7474

src/content/reference/react/useEffect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function ChatRoom({ roomId }) {
6262
6363
* If some of your dependencies are objects or functions defined inside the component, there is a risk that they will **cause the Effect to re-run more often than needed.** To fix this, remove unnecessary [object](#removing-unnecessary-object-dependencies) and [function](#removing-unnecessary-function-dependencies) dependencies. You can also [extract state updates](#updating-state-based-on-previous-state-from-an-effect) and [non-reactive logic](#reading-the-latest-props-and-state-from-an-effect) outside of your Effect.
6464
65-
* If your Effect wasn't caused by an interaction (like a click), React will let the browser **paint the updated screen first before running your Effect.** If your Effect is doing something visual (for example, positioning a tooltip), and the delay is noticeable (for example, it flickers), replace `useEffect` with [`useLayoutEffect`.](/reference/react/useLayoutEffect)
65+
* If your Effect wasn't caused by an interaction (like a click), React will generally let the browser **paint the updated screen first before running your Effect.** If your Effect is doing something visual (for example, positioning a tooltip), and the delay is noticeable (for example, it flickers), replace `useEffect` with [`useLayoutEffect`.](/reference/react/useLayoutEffect)
6666
6767
* Even if your Effect was caused by an interaction (like a click), **the browser may repaint the screen before processing the state updates inside your Effect.** Usually, that's what you want. However, if you must block the browser from repainting the screen, you need to replace `useEffect` with [`useLayoutEffect`.](/reference/react/useLayoutEffect)
6868

0 commit comments

Comments
 (0)