Skip to content

Commit 4e3447b

Browse files
merging all conflicts
2 parents a8eaf84 + 46a54e0 commit 4e3447b

57 files changed

Lines changed: 899 additions & 291 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ contact_links:
33
url: https://github.com/react/react/issues/new/choose
44
about: This issue tracker is not for bugs in React. Please file React issues here.
55
- name: 🤔 Questions and Help
6-
url: https://reactjs.org/community/support.html
6+
url: https://react.dev/community
77
about: This issue tracker is not for support questions. Please refer to the React community's help and discussion forums.

‎.github/workflows/analyze.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
- name: Set up node
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: '20.x'
21+
node-version: '24.x'
2222
cache: yarn
2323
cache-dependency-path: yarn.lock
2424

2525
- name: Restore cached node_modules
2626
uses: actions/cache@v4
2727
with:
2828
path: '**/node_modules'
29-
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
29+
key: node_modules-24-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3030

3131
- name: Install deps
3232
run: yarn install --frozen-lockfile

‎.github/workflows/site_lint.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ jobs:
1313
lint:
1414
runs-on: ubuntu-latest
1515

16-
name: Lint on node 20.x and ubuntu-latest
16+
name: Lint on node 24.x and ubuntu-latest
1717

1818
steps:
1919
- uses: actions/checkout@v4
20-
- name: Use Node.js 20.x
20+
- name: Use Node.js 24.x
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version: 20.x
23+
node-version: 24.x
2424
cache: yarn
2525
cache-dependency-path: yarn.lock
2626

2727
- name: Restore cached node_modules
2828
uses: actions/cache@v4
2929
with:
3030
path: '**/node_modules'
31-
key: node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
31+
key: node_modules-24-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
3232

3333
- name: Install deps
3434
run: yarn install --frozen-lockfile

‎CLAUDE.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code when working with this repository.
44

55
## Project Overview
66

7-
This is the React documentation website (react.dev), built with Next.js 15.1.11 and React 19. Documentation is written in MDX format.
7+
This is the React documentation website (react.dev), built with Next.js 15.1.12 and React 19. Documentation is written in MDX format.
88

99
## Development Commands
1010

@@ -47,6 +47,6 @@ When editing files in `src/content/`, the appropriate skill will be auto-suggest
4747
For MDX components (DeepDive, Pitfall, Note, etc.), invoke `/docs-components`.
4848
For Sandpack code examples, invoke `/docs-sandpack`.
4949

50-
See `.claude/docs/react-docs-patterns.md` for comprehensive style guidelines.
50+
See `.claude/skills/` for comprehensive style guidelines.
5151

5252
Prettier is used for formatting (config in `.prettierrc`).

‎CONTRIBUTING.md‎

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,41 +38,9 @@ Ignore this if you're specifically describing `createElement`.
3838

3939
Ignore this if you're specifically writing about ES5.
4040

41-
#### Don't use ES6 features when equivalent ES5 features have no downsides.
41+
#### Prefer readable syntax.
4242

43-
Remember that ES6 is still new to a lot of people. While we use it in many places (`const` / `let`, classes, arrow functions), if the equivalent ES5 code is just as straightforward and readable, consider using it.
44-
45-
In particular, you should prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. However, you *should* use arrow functions where they provide a tangible improvement (such as preserving `this` context inside a component). Consider both sides of the tradeoff when deciding whether to use a new feature.
46-
47-
#### Don't use features that aren't standardized yet.
48-
49-
For example, **don't** write this:
50-
51-
```js
52-
class MyComponent extends React.Component {
53-
state = {value: ''};
54-
handleChange = (e) => {
55-
this.setState({value: e.target.value});
56-
};
57-
}
58-
```
59-
60-
Instead, **do** write this:
61-
62-
```js
63-
class MyComponent extends React.Component {
64-
constructor(props) {
65-
super(props);
66-
this.handleChange = this.handleChange.bind(this);
67-
this.state = {value: ''};
68-
}
69-
handleChange(e) {
70-
this.setState({value: e.target.value});
71-
}
72-
}
73-
```
74-
75-
Ignore this rule if you're specifically describing an experimental proposal. Make sure to mention its experimental nature in the code and in the surrounding text.
43+
Choose syntax that makes each example easier to follow. Prefer named `function` declarations over `const myFunction = () => ...` arrows for top-level functions. Use arrow functions when they make callbacks easier to read. In class components, arrow functions can also preserve the component's `this` value.
7644

7745
### Style
7846

‎README.md‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ Hi dev, We are Bengali React doc translation community welcome you to join the d
1010
### Prerequisites
1111

1212
1. Git
13-
1. Node: any version starting with v16.8.0 or greater
14-
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
13+
1. Node: v24 or greater
14+
1. Yarn Classic: See [Yarn website for installation instructions](https://classic.yarnpkg.com/en/docs/install/)
1515
1. A fork of the repo (for any contributions)
1616
1. A clone of the [bn.react.dev repo](https://github.com/reactjs/bn.react.dev) on your local machine
1717

1818
### Installation
1919

20+
<<<<<<< HEAD
2021
1. `cd bn.react.dev` to go into the project root
22+
=======
23+
1. `cd react.dev` to go into the project root
24+
2. `git remote add my-fork-name https://github.com/YOUR_USERNAME/react.dev.git` to add your fork as a remote. Replace `YOUR_USERNAME` with your GitHub username. You only need to do this once.
25+
>>>>>>> 46a54e0592729712b7640308b53268e84fdc7c9f
2126
3. `yarn` to install the website's npm dependencies
2227

2328
### Running locally
@@ -42,8 +47,8 @@ The documentation is divided into several sections with a different tone and pur
4247
1. Follow the ["Running locally"](#running-locally) instructions
4348
1. Save the files and check in the browser
4449
1. Changes to React components in `src` will hot-reload
45-
1. Changes to markdown files in `content` will hot-reload
46-
1. If working with plugins, you may need to remove the `.cache` directory and restart the server
50+
1. Changes to markdown files in `src/content` will hot-reload
51+
1. If working with plugins, you may need to remove the `node_modules/.cache/react-docs-mdx` directory and restart the server
4752

4853
### Test the change
4954

@@ -60,7 +65,11 @@ The documentation is divided into several sections with a different tone and pur
6065

6166
## Translation
6267

68+
<<<<<<< HEAD
6369
If you are interested in translating `bn.react.dev`, please see the current translation efforts [here](https://github.com/reactjs/bn.react.dev/issues/1).
70+
=======
71+
If you are interested in translating `react.dev`, please see the current translation efforts [here](https://react.dev/community/translations).
72+
>>>>>>> 46a54e0592729712b7640308b53268e84fdc7c9f
6473
6574
## License
6675
Content submitted to [bn.react.dev](https://bn.react.dev/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/reactjs/bn.react.dev/blob/main/LICENSE-DOCS.md) file.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"webpack-bundle-analyzer": "^4.5.0"
112112
},
113113
"engines": {
114-
"node": ">=16.8.0"
114+
"node": ">=24"
115115
},
116116
"nextBundleAnalysis": {
117117
"budget": null,

‎src/components/MDX/TeamMember.tsx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function GroupBadges({group}: {group: string}) {
6868
);
6969
}
7070

71-
// TODO: good alt text for images/links
71+
// TODO: good alt text for images
7272
export function TeamMember({
7373
name,
7474
title,
@@ -113,7 +113,7 @@ export function TeamMember({
113113
aria-label={`${name} on Twitter`}
114114
href={`https://twitter.com/${twitter}`}
115115
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
116-
<IconTwitter className="pe-1" />
116+
<IconTwitter className="pe-1" aria-hidden="true" />
117117
{twitter}
118118
</ExternalLink>
119119
</div>
@@ -124,7 +124,7 @@ export function TeamMember({
124124
aria-label={`${name} on Threads`}
125125
href={`https://threads.net/${threads}`}
126126
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
127-
<IconThreads className="pe-1" />
127+
<IconThreads className="pe-1" aria-hidden="true" />
128128
{threads}
129129
</ExternalLink>
130130
</div>
@@ -135,27 +135,27 @@ export function TeamMember({
135135
aria-label={`${name} on Bluesky`}
136136
href={`https://bsky.app/profile/${bsky}`}
137137
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
138-
<IconBsky className="pe-1" />
138+
<IconBsky className="pe-1" aria-hidden="true" />
139139
{bsky}
140140
</ExternalLink>
141141
</div>
142142
)}
143143
{github && (
144144
<div className="me-4">
145145
<ExternalLink
146-
aria-label="GitHub Profile"
146+
aria-label={`${name} on GitHub`}
147147
href={`https://github.com/${github}`}
148148
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
149-
<IconGitHub className="pe-1" /> {github}
149+
<IconGitHub className="pe-1" aria-hidden="true" /> {github}
150150
</ExternalLink>
151151
</div>
152152
)}
153153
{personal && (
154154
<ExternalLink
155-
aria-label="Personal Site"
155+
aria-label={`${name}'s personal website`}
156156
href={`https://${personal}`}
157157
className="hover:text-primary hover:underline dark:text-primary-dark flex flex-row items-center">
158-
<IconLink className="pe-1" /> {personal}
158+
<IconLink className="pe-1" aria-hidden="true" /> {personal}
159159
</ExternalLink>
160160
)}
161161
</div>

‎src/content/blog/2023/03/16/introducing-react-dev.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ When we released React Hooks in 2018, the Hooks docs assumed the reader is famil
4242
**The new docs teach React with Hooks from the beginning.** The docs are divided in two main sections:
4343

4444
* **[Learn React](/learn)** is a self-paced course that teaches React from scratch.
45-
* **[API Reference](/reference)** provides the details and usage examples for every React API.
45+
* **[API Reference](/reference/react)** provides the details and usage examples for every React API.
4646

4747
Let's have a closer look at what you can find in each section.
4848

@@ -462,7 +462,7 @@ In the [API Reference](/reference/react), every React API now has a dedicated pa
462462
- Built-in Hooks like [`useState`](/reference/react/useState).
463463
- Built-in components like [`<Suspense>`](/reference/react/Suspense).
464464
- Built-in browser components like [`<input>`](/reference/react-dom/components/input).
465-
- Framework-oriented APIs like [`renderToPipeableStream`](/reference/react-dom/server/renderToReadableStream).
465+
- Framework-oriented APIs like [`renderToPipeableStream`](/reference/react-dom/server/renderToPipeableStream).
466466
- Other React APIs like [`memo`](/reference/react/memo).
467467

468468
You'll notice that every API page is split into at least two segments: *Reference* and *Usage*.
@@ -607,7 +607,7 @@ button { display: block; margin-top: 10px; }
607607

608608
</Recipes>
609609

610-
Some API pages also include [Troubleshooting](/reference/react/useEffect#troubleshooting) (for common problems) and [Alternatives](/reference/react-dom/findDOMNode#alternatives) (for deprecated APIs).
610+
Some API pages also include [Troubleshooting](/reference/react/useEffect#troubleshooting) (for common problems) and [Alternatives](https://18.react.dev/reference/react-dom/findDOMNode#alternatives) (for deprecated APIs).
611611

612612
We hope that this approach will make the API reference useful not only as a way to look up an argument, but as a way to see all the different things you can do with any given API—and how it connects to the other ones.
613613

‎src/content/blog/2024/04/25/react-19-upgrade-guide.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ const ref = useRef<number>(null);
639639
ref.current = 1;
640640
```
641641

642-
`MutableRef` is now deprecated in favor of a single `RefObject` type which `useRef` will always return:
642+
`MutableRefObject` is now deprecated in favor of a single `RefObject` type which `useRef` will always return:
643643

644644
```ts
645645
interface RefObject<T> {

0 commit comments

Comments
 (0)