Skip to content

Commit a16e783

Browse files
merging all conflicts
2 parents 290cb85 + 50d6991 commit a16e783

27 files changed

+192
-158
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
@@ -1172,7 +1172,7 @@ async function Talks({ confId }) {
11721172
</CodeBlock>
11731173
}
11741174
right={
1175-
<NavContext.Provider value={{slug, navigate}}>
1175+
<NavContext value={{slug, navigate}}>
11761176
<BrowserChrome
11771177
domain="example.com"
11781178
path={'confs/' + slug}
@@ -1192,7 +1192,7 @@ async function Talks({ confId }) {
11921192
</Suspense>
11931193
</ExamplePanel>
11941194
</BrowserChrome>
1195-
</NavContext.Provider>
1195+
</NavContext>
11961196
}
11971197
/>
11981198
);

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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ September 2-4, 2025. Wrocław, Poland.
4545

4646
[Website](https://www.reactuniverseconf.com/) - [Twitter](https://twitter.com/react_native_eu) - [LinkedIn](https://www.linkedin.com/events/reactuniverseconf7163919537074118657/)
4747

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

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/keeping-components-pure.md

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function Cup({ guest }) {
176176
}
177177

178178
export default function TeaGathering() {
179-
let cups = [];
179+
const cups = [];
180180
for (let i = 1; i <= 12; i++) {
181181
cups.push(<Cup key={i} guest={i} />);
182182
}
@@ -246,7 +246,7 @@ export default function TeaGathering() {
246246

247247
```js src/Clock.js active
248248
export default function Clock({ time }) {
249-
let hours = time.getHours();
249+
const hours = time.getHours();
250250
if (hours >= 0 && hours <= 6) {
251251
document.getElementById('time').className = 'night';
252252
} else {
@@ -308,7 +308,7 @@ body > * {
308308

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

610+
<<<<<<< HEAD
610611
let initialStories = [
611612
{id: 0, label: "Гісторыя Анкіта" },
612613
{id: 1, label: "Гісторыя Тэйлара" },
614+
=======
615+
const initialStories = [
616+
{id: 0, label: "Ankit's Story" },
617+
{id: 1, label: "Taylor's Story" },
618+
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
613619
];
614620

615621
export default function App() {
616-
let [stories, setStories] = useState([...initialStories])
617-
let time = useTime();
622+
const [stories, setStories] = useState([...initialStories])
623+
const time = useTime();
618624

619625
// HACK: Прадухіленне вечнага росту памяці падчас чытання дакументаў.
620626
// Тут мы парушаем свае ўласныя правілы.
@@ -703,14 +709,20 @@ export default function StoryTray({ stories }) {
703709
import { useState, useEffect } from 'react';
704710
import StoryTray from './StoryTray.js';
705711

712+
<<<<<<< HEAD
706713
let initialStories = [
707714
{id: 0, label: "Гісторыя Анкіта" },
708715
{id: 1, label: "Гісторыя Тэйлара" },
716+
=======
717+
const initialStories = [
718+
{id: 0, label: "Ankit's Story" },
719+
{id: 1, label: "Taylor's Story" },
720+
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
709721
];
710722

711723
export default function App() {
712-
let [stories, setStories] = useState([...initialStories])
713-
let time = useTime();
724+
const [stories, setStories] = useState([...initialStories])
725+
const time = useTime();
714726

715727
// HACK: Прадухіленне вечнага росту памяці падчас чытання дакументаў.
716728
// Тут мы парушаем свае ўласныя правілы.
@@ -770,8 +782,13 @@ li {
770782

771783
```js src/StoryTray.js active
772784
export default function StoryTray({ stories }) {
785+
<<<<<<< HEAD
773786
// Скапіруйце масіў!
774787
let storiesToDisplay = stories.slice();
788+
=======
789+
// Copy the array!
790+
const storiesToDisplay = stories.slice();
791+
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
775792

776793
// Не ўплывае на зыходны масіў:
777794
storiesToDisplay.push({
@@ -795,14 +812,20 @@ export default function StoryTray({ stories }) {
795812
import { useState, useEffect } from 'react';
796813
import StoryTray from './StoryTray.js';
797814

815+
<<<<<<< HEAD
798816
let initialStories = [
799817
{id: 0, label: "Гісторыя Анкіта" },
800818
{id: 1, label: "Гісторыя Тэйлара" },
819+
=======
820+
const initialStories = [
821+
{id: 0, label: "Ankit's Story" },
822+
{id: 1, label: "Taylor's Story" },
823+
>>>>>>> 50d6991ca6652f4bc4c985cf0c0e593864f2cc91
801824
];
802825

803826
export default function App() {
804-
let [stories, setStories] = useState([...initialStories])
805-
let time = useTime();
827+
const [stories, setStories] = useState([...initialStories])
828+
const time = useTime();
806829

807830
// HACK: Прадухіленне вечнага росту памяці падчас чытання дакументаў.
808831
// Тут мы парушаем свае ўласныя правілы.

src/content/learn/managing-state.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,9 @@ export default function Section({ children }) {
741741
const level = useContext(LevelContext);
742742
return (
743743
<section className="section">
744-
<LevelContext.Provider value={level + 1}>
744+
<LevelContext value={level + 1}>
745745
{children}
746-
</LevelContext.Provider>
746+
</LevelContext>
747747
</section>
748748
);
749749
}
@@ -836,13 +836,11 @@ export function TasksProvider({ children }) {
836836
);
837837

838838
return (
839-
<TasksContext.Provider value={tasks}>
840-
<TasksDispatchContext.Provider
841-
value={dispatch}
842-
>
839+
<TasksContext value={tasks}>
840+
<TasksDispatchContext value={dispatch}>
843841
{children}
844-
</TasksDispatchContext.Provider>
845-
</TasksContext.Provider>
842+
</TasksDispatchContext>
843+
</TasksContext>
846844
);
847845
}
848846

src/content/learn/referencing-values-with-refs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ export default function Toggle() {
464464

465465
#### Fix debouncing {/*fix-debouncing*/}
466466

467-
In this example, all button click handlers are ["debounced".](https://redd.one/blog/debounce-vs-throttle) To see what this means, press one of the buttons. Notice how the message appears a second later. If you press the button while waiting for the message, the timer will reset. So if you keep clicking the same button fast many times, the message won't appear until a second *after* you stop clicking. Debouncing lets you delay some action until the user "stops doing things".
467+
In this example, all button click handlers are ["debounced".](https://kettanaito.com/blog/debounce-vs-throttle) To see what this means, press one of the buttons. Notice how the message appears a second later. If you press the button while waiting for the message, the timer will reset. So if you keep clicking the same button fast many times, the message won't appear until a second *after* you stop clicking. Debouncing lets you delay some action until the user "stops doing things".
468468

469469
This example works, but not quite as intended. The buttons are not independent. To see the problem, click one of the buttons, and then immediately click another button. You'd expect that after a delay, you would see both button's messages. But only the last button's message shows up. The first button's message gets lost.
470470

src/content/learn/scaling-up-with-reducer-and-context.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -461,11 +461,11 @@ export default function TaskApp() {
461461
const [tasks, dispatch] = useReducer(tasksReducer, initialTasks);
462462
// ...
463463
return (
464-
<TasksContext.Provider value={tasks}>
465-
<TasksDispatchContext.Provider value={dispatch}>
464+
<TasksContext value={tasks}>
465+
<TasksDispatchContext value={dispatch}>
466466
...
467-
</TasksDispatchContext.Provider>
468-
</TasksContext.Provider>
467+
</TasksDispatchContext>
468+
</TasksContext>
469469
);
470470
}
471471
```
@@ -509,8 +509,8 @@ export default function TaskApp() {
509509
}
510510

511511
return (
512-
<TasksContext.Provider value={tasks}>
513-
<TasksDispatchContext.Provider value={dispatch}>
512+
<TasksContext value={tasks}>
513+
<TasksDispatchContext value={dispatch}>
514514
<h1>Day off in Kyoto</h1>
515515
<AddTask
516516
onAddTask={handleAddTask}
@@ -520,8 +520,8 @@ export default function TaskApp() {
520520
onChangeTask={handleChangeTask}
521521
onDeleteTask={handleDeleteTask}
522522
/>
523-
</TasksDispatchContext.Provider>
524-
</TasksContext.Provider>
523+
</TasksDispatchContext>
524+
</TasksContext>
525525
);
526526
}
527527

@@ -676,13 +676,13 @@ In the next step, you will remove prop passing.
676676
Now you don't need to pass the list of tasks or the event handlers down the tree:
677677

678678
```js {4-5}
679-
<TasksContext.Provider value={tasks}>
680-
<TasksDispatchContext.Provider value={dispatch}>
679+
<TasksContext value={tasks}>
680+
<TasksDispatchContext value={dispatch}>
681681
<h1>Day off in Kyoto</h1>
682682
<AddTask />
683683
<TaskList />
684-
</TasksDispatchContext.Provider>
685-
</TasksContext.Provider>
684+
</TasksDispatchContext>
685+
</TasksContext>
686686
```
687687

688688
Instead, any component that needs the task list can read it from the `TaskContext`:
@@ -730,13 +730,13 @@ export default function TaskApp() {
730730
);
731731

732732
return (
733-
<TasksContext.Provider value={tasks}>
734-
<TasksDispatchContext.Provider value={dispatch}>
733+
<TasksContext value={tasks}>
734+
<TasksDispatchContext value={dispatch}>
735735
<h1>Day off in Kyoto</h1>
736736
<AddTask />
737737
<TaskList />
738-
</TasksDispatchContext.Provider>
739-
</TasksContext.Provider>
738+
</TasksDispatchContext>
739+
</TasksContext>
740740
);
741741
}
742742

@@ -921,11 +921,11 @@ export function TasksProvider({ children }) {
921921
const [tasks, dispatch] = useReducer(tasksReducer, initialTasks);
922922

923923
return (
924-
<TasksContext.Provider value={tasks}>
925-
<TasksDispatchContext.Provider value={dispatch}>
924+
<TasksContext value={tasks}>
925+
<TasksDispatchContext value={dispatch}>
926926
{children}
927-
</TasksDispatchContext.Provider>
928-
</TasksContext.Provider>
927+
</TasksDispatchContext>
928+
</TasksContext>
929929
);
930930
}
931931
```
@@ -963,11 +963,11 @@ export function TasksProvider({ children }) {
963963
);
964964

965965
return (
966-
<TasksContext.Provider value={tasks}>
967-
<TasksDispatchContext.Provider value={dispatch}>
966+
<TasksContext value={tasks}>
967+
<TasksDispatchContext value={dispatch}>
968968
{children}
969-
</TasksDispatchContext.Provider>
970-
</TasksContext.Provider>
969+
</TasksDispatchContext>
970+
</TasksContext>
971971
);
972972
}
973973

@@ -1174,11 +1174,11 @@ export function TasksProvider({ children }) {
11741174
);
11751175

11761176
return (
1177-
<TasksContext.Provider value={tasks}>
1178-
<TasksDispatchContext.Provider value={dispatch}>
1177+
<TasksContext value={tasks}>
1178+
<TasksDispatchContext value={dispatch}>
11791179
{children}
1180-
</TasksDispatchContext.Provider>
1181-
</TasksContext.Provider>
1180+
</TasksDispatchContext>
1181+
</TasksContext>
11821182
);
11831183
}
11841184

@@ -1363,4 +1363,3 @@ As your app grows, you may have many context-reducer pairs like this. This is a
13631363
- You can have many context-reducer pairs like this in your app.
13641364
13651365
</Recap>
1366-

0 commit comments

Comments
 (0)