Skip to content

Commit db55709

Browse files
merging all conflicts
2 parents de36eba + 15653c0 commit db55709

67 files changed

Lines changed: 1785 additions & 614 deletions

File tree

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`).

‎CODE_OF_CONDUCT.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ a project may be further defined and clarified by project maintainers.
5555
## Enforcement
5656

5757
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58-
reported by contacting the project team at <opensource-conduct@fb.com>. All
59-
complaints will be reviewed and investigated and will result in a response that
58+
reported by following the
59+
[reporting instructions in React's Code of Conduct](https://github.com/react/react/blob/main/CODE_OF_CONDUCT.md#enforcement).
60+
All complaints will be reviewed and investigated and will result in a response that
6061
is deemed necessary and appropriate to the circumstances. The project team is
6162
obligated to maintain confidentiality with regard to the reporter of an incident.
6263
Further details of specific enforcement policies may be posted separately.

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ Thank you for your interest in contributing to the React Docs!
44

55
## Code of Conduct
66

7-
Facebook has adopted a Code of Conduct that we expect project
8-
participants to adhere to. Please [read the full text](https://code.facebook.com/codeofconduct)
9-
so that you can understand what actions will and will not be tolerated.
7+
We expect all project participants to follow our [Code of Conduct](./CODE_OF_CONDUCT.md).
108

119
## Technical Writing Tips
1210

@@ -38,41 +36,9 @@ Ignore this if you're specifically describing `createElement`.
3836

3937
Ignore this if you're specifically writing about ES5.
4038

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

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.
41+
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.
7642

7743
### Style
7844

‎README.md‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,26 @@
22

33
This repo contains the source code and documentation powering [react.dev](https://react.dev/).
44

5+
<<<<<<< HEAD
56
> 以下はオリジナル(英語版)リポジトリの README です。日本語版 React ドキュメントへの貢献(翻訳・修正など)に興味がある方は[こちらの Wiki ページ](https://github.com/reactjs/ja.react.dev/wiki)を参照してください。
7+
=======
8+
React is a project of the [React Foundation](https://react.foundation/), hosted by the [Linux Foundation](https://www.linuxfoundation.org/).
9+
>>>>>>> 15653c0f9b95d6c4845e614e5bcc94c7ee2128f6
610
711
## Getting started
812

913
### Prerequisites
1014

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

1721
### Installation
1822

1923
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.
2025
3. `yarn` to install the website's npm dependencies
2126

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

4752
### Test the change
4853

@@ -59,7 +64,7 @@ The documentation is divided into several sections with a different tone and pur
5964

6065
## Translation
6166

62-
If you are interested in translating `react.dev`, please see the current translation efforts [here](https://github.com/reactjs/react.dev/issues/4135).
67+
If you are interested in translating `react.dev`, please see the current translation efforts [here](https://react.dev/community/translations).
6368

6469
## License
6570
Content submitted to [react.dev](https://react.dev/) is CC-BY-4.0 licensed, as found in the [LICENSE-DOCS.md](https://github.com/reactjs/react.dev/blob/main/LICENSE-DOCS.md) file.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"webpack-bundle-analyzer": "^4.5.0"
114114
},
115115
"engines": {
116-
"node": ">=16.8.0"
116+
"node": ">=24"
117117
},
118118
"nextBundleAnalysis": {
119119
"budget": null,

0 commit comments

Comments
 (0)