Skip to content

Commit e749d7e

Browse files
authored
Merge pull request #98 from reactjs/sync-50d6991c
Sync with react.dev @ 50d6991
2 parents 5032cf0 + ef55504 commit e749d7e

28 files changed

+173
-175
lines changed

.github/workflows/analyze_comment.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ on:
66
types:
77
- completed
88

9-
permissions: {}
10-
9+
permissions:
10+
contents: read
11+
issues: write
12+
pull-requests: write
13+
1114
jobs:
1215
comment:
1316
runs-on: ubuntu-latest

src/components/Layout/HomeContent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ async function Talks({ confId }) {
11831183
</CodeBlock>
11841184
}
11851185
right={
1186-
<NavContext.Provider value={{slug, navigate}}>
1186+
<NavContext value={{slug, navigate}}>
11871187
<BrowserChrome
11881188
domain="example.com"
11891189
path={'confs/' + slug}
@@ -1203,7 +1203,7 @@ async function Talks({ confId }) {
12031203
</Suspense>
12041204
</ExamplePanel>
12051205
</BrowserChrome>
1206-
</NavContext.Provider>
1206+
</NavContext>
12071207
}
12081208
/>
12091209
);

src/components/Layout/Page.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,9 @@ export function Page({
8282
'max-w-7xl mx-auto',
8383
section === 'blog' && 'lg:flex lg:flex-col lg:items-center'
8484
)}>
85-
<TocContext.Provider value={toc}>
86-
<LanguagesContext.Provider value={languages}>
87-
{children}
88-
</LanguagesContext.Provider>
89-
</TocContext.Provider>
85+
<TocContext value={toc}>
86+
<LanguagesContext value={languages}>{children}</LanguagesContext>
87+
</TocContext>
9088
</div>
9189
{!isBlogIndex && (
9290
<DocsPageFooter

src/components/Layout/TopNav/TopNav.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ export default function TopNav({
266266
<BrandMenu>
267267
<div className="flex items-center">
268268
<div className="uwu-visible flex items-center justify-center h-full">
269-
<NextLink href="/">
269+
<NextLink
270+
href="/"
271+
className="active:scale-95 transition-transform">
270272
<Image
271273
alt="logo by @sawaratsuki1004"
272274
title="logo by @sawaratsuki1004"

src/components/MDX/MDXComponents.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function IllustrationBlock({
354354
</figure>
355355
));
356356
return (
357-
<IllustrationContext.Provider value={isInBlockTrue}>
357+
<IllustrationContext value={isInBlockTrue}>
358358
<div className="relative group before:absolute before:-inset-y-16 before:inset-x-0 my-16 mx-0 2xl:mx-auto max-w-4xl 2xl:max-w-6xl">
359359
{sequential ? (
360360
<ol className="mdx-illustration-block flex">
@@ -369,7 +369,7 @@ function IllustrationBlock({
369369
)}
370370
<AuthorCredit author={author} authorLink={authorLink} />
371371
</div>
372-
</IllustrationContext.Provider>
372+
</IllustrationContext>
373373
);
374374
}
375375

src/content/blog/2024/12/05/react-19.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ New function components will no longer need `forwardRef`, and we will be publish
410410

411411
<Note>
412412

413-
`refs` passed to classes are not passed as props since they reference the component instance.
413+
`ref`s passed to classes are not passed as props since they reference the component instance.
414414

415415
</Note>
416416

src/content/community/conferences.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ July 03 - 05, 2025. In-person in Bangalore, India
4444

4545
[Website](https://reactday.berlin/) - [Twitter](https://x.com/reactdayberlin)
4646

47+
### React Alicante 2025 {/*react-alicante-2025*/}
48+
October 2-4, 2025. Alicante, Spain.
49+
50+
[Website](https://reactalicante.es/) - [Twitter](https://x.com/ReactAlicante) - [Bluesky](https://bsky.app/profile/reactalicante.es) - [YouTube](https://www.youtube.com/channel/UCaSdUaITU1Cz6PvC97A7e0w)
4751
### React Conf 2025 {/*react-conf-2025*/}
4852
October 7-8, 2025. Henderson, Nevada, USA and free livestream
4953

src/content/community/meetups.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Do you have a local React.js meetup? Add it here! (Please keep the list alphabet
8888
* [Delhi NCR](https://www.meetup.com/React-Delhi-NCR/)
8989
* [Mumbai](https://reactmumbai.dev)
9090
* [Pune](https://www.meetup.com/ReactJS-and-Friends/)
91+
* [Rajasthan](https://reactrajasthan.com)
9192

9293
## Indonesia {/*indonesia*/}
9394
* [Indonesia](https://www.meetup.com/reactindonesia/)

src/content/learn/installation.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,12 @@ If want to try using React in your existing app or a website, you can [add React
4747

4848
<Note>
4949

50-
## React қосымшасын нөлден құру {/*build-a-react-app-from-scratch*/}
51-
52-
Егер фреймворк сіздің жобаңызға сәйкес келмесе, өз фреймворкіңізді құрғыныз келсе немесе React қосымшасының негіздерін үйренгіңіз келсе, [React қосымшасын нөлден құра аласыз.](/learn/build-a-react-app-from-scratch)
53-
54-
## Бар жобаға React-тi қосыңыз {/*add-react-to-an-existing-project*/}
50+
#### Should I use Create React App? {/*should-i-use-create-react-app*/}
5551

5652
No. Create React App has been deprecated. For more information, see [Sunsetting Create React App](/blog/2025/02/14/sunsetting-create-react-app).
5753

58-
<Note>
59-
60-
#### Create React App қолдану керек пе? {/*should-i-use-create-react-app*/}
61-
62-
Жоқ. Create React App ескірген. Қосымша ақпарат үшін [Create React App-тің тоқтатылуы](/blog/2025/02/14/sunsetting-create-react-app) бөлімін қараңыз.
63-
6454
</Note>
6555

66-
## Келесі қадамдар {/*next-steps*/}
67-
6856
## Next steps {/*next-steps*/}
6957

7058
Head to the [Quick Start](/learn) guide for a tour of the most important React concepts you will encounter every day.

src/content/learn/keeping-components-pure.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function Cup({ guest }) {
175175
}
176176

177177
export default function TeaGathering() {
178-
let cups = [];
178+
const cups = [];
179179
for (let i = 1; i <= 12; i++) {
180180
cups.push(<Cup key={i} guest={i} />);
181181
}
@@ -245,7 +245,7 @@ Rendering is a *calculation*, it shouldn't try to "do" things. Can you express t
245245

246246
```js src/Clock.js active
247247
export default function Clock({ time }) {
248-
let hours = time.getHours();
248+
const hours = time.getHours();
249249
if (hours >= 0 && hours <= 6) {
250250
document.getElementById('time').className = 'night';
251251
} else {
@@ -307,7 +307,7 @@ You can fix this component by calculating the `className` and including it in th
307307

308308
```js src/Clock.js active
309309
export default function Clock({ time }) {
310-
let hours = time.getHours();
310+
const hours = time.getHours();
311311
let className;
312312
if (hours >= 0 && hours <= 6) {
313313
className = 'night';
@@ -606,14 +606,14 @@ export default function StoryTray({ stories }) {
606606
import { useState, useEffect } from 'react';
607607
import StoryTray from './StoryTray.js';
608608

609-
let initialStories = [
609+
const initialStories = [
610610
{id: 0, label: "Ankit's Story" },
611611
{id: 1, label: "Taylor's Story" },
612612
];
613613

614614
export default function App() {
615-
let [stories, setStories] = useState([...initialStories])
616-
let time = useTime();
615+
const [stories, setStories] = useState([...initialStories])
616+
const time = useTime();
617617

618618
// HACK: Prevent the memory from growing forever while you read docs.
619619
// We're breaking our own rules here.
@@ -702,14 +702,14 @@ export default function StoryTray({ stories }) {
702702
import { useState, useEffect } from 'react';
703703
import StoryTray from './StoryTray.js';
704704

705-
let initialStories = [
705+
const initialStories = [
706706
{id: 0, label: "Ankit's Story" },
707707
{id: 1, label: "Taylor's Story" },
708708
];
709709

710710
export default function App() {
711-
let [stories, setStories] = useState([...initialStories])
712-
let time = useTime();
711+
const [stories, setStories] = useState([...initialStories])
712+
const time = useTime();
713713

714714
// HACK: Prevent the memory from growing forever while you read docs.
715715
// We're breaking our own rules here.
@@ -770,7 +770,7 @@ Alternatively, you could create a _new_ array (by copying the existing one) befo
770770
```js src/StoryTray.js active
771771
export default function StoryTray({ stories }) {
772772
// Copy the array!
773-
let storiesToDisplay = stories.slice();
773+
const storiesToDisplay = stories.slice();
774774

775775
// Does not affect the original array:
776776
storiesToDisplay.push({
@@ -794,14 +794,14 @@ export default function StoryTray({ stories }) {
794794
import { useState, useEffect } from 'react';
795795
import StoryTray from './StoryTray.js';
796796

797-
let initialStories = [
797+
const initialStories = [
798798
{id: 0, label: "Ankit's Story" },
799799
{id: 1, label: "Taylor's Story" },
800800
];
801801

802802
export default function App() {
803-
let [stories, setStories] = useState([...initialStories])
804-
let time = useTime();
803+
const [stories, setStories] = useState([...initialStories])
804+
const time = useTime();
805805

806806
// HACK: Prevent the memory from growing forever while you read docs.
807807
// We're breaking our own rules here.

0 commit comments

Comments
 (0)