Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
24618e2
Add a conditional browser query example (#8617)
aurorascharff Aug 31, 2026
f3d9794
Document missing react-dom server rendering and hydration options (#8…
eps1lon Sep 3, 2026
0006861
Validate inline code highlight metadata in CI (#8645)
aurorascharff Sep 8, 2026
521d4c2
Prepare site for React 19.3 release (#8649)
samselikoff Sep 9, 2026
fde7662
Document Strict Mode hydration behavior in React 19.3 (#8651)
samselikoff Sep 10, 2026
8efce78
Clarify error handling for standalone startTransition (#8648)
aurorascharff Sep 10, 2026
f7f4524
Reword `browser()` Server Component caveat (#8652)
hernan-yadiel Sep 14, 2026
b011783
Add React Advanced London 2026 and React Summit US 2026 (#8608)
artur-nikitsin Sep 18, 2026
44b0b5f
Add an `<img>` API reference (#8658)
aurorascharff Sep 23, 2026
75ef18a
Add ViewTransition and addTransitionType to the reference indexes (#8…
BIGSUS24 Sep 29, 2026
8c68ae8
Use relative link, without domain, to Compiler docs (#8678)
smikitky Oct 1, 2026
046f17d
Clarify image loading during View Transitions (#8671)
aurorascharff Oct 6, 2026
ae5e480
Add React DevTools for agents reference page (#8694)
hoxyq Oct 20, 2026
0821e7d
docs: document fetchPriority support for preloadModule and preinitMod…
coolwent Oct 27, 2026
0f7e4ec
Fix broken React Router links in "Synchronizing with Effects" and use…
romach Nov 3, 2026
97074a1
docs: add <form> to React DOM components overview (#8717)
YashCoder-svg Nov 3, 2026
0334d1d
Update conferences: move concluded Sep 2026 events to Past, fix React…
ShakilUrRehman21 Nov 3, 2026
7ca4886
Normalize aria-labels on TeamMember social links (#8592)
deepusnath Nov 3, 2026
6be2e2a
docs: Add useOptimistic hook description to hooks reference page (#8571)
martinrebo Nov 3, 2026
5532a01
Revert "docs: Add useOptimistic hook description to hooks reference p…
aurorascharff Nov 3, 2026
ae5c052
docs: add useOptimistic to Built-in React Hooks overview (#8625)
Iitian001 Nov 3, 2026
6b0a30d
Add missing 2026 conferences (#8730)
aurorascharff Nov 4, 2026
2177e28
Fix Server Function examples for Actions, forms, and useActionState (…
smith558 Nov 4, 2026
c1178e2
Update form documentation for forms default reset behavior (#8512)
MaxwellCohen Nov 5, 2026
dc8eb1e
Fix Server Function signature and two typos in 'use server' reference…
BlackHatMan Nov 5, 2026
879fe8c
Just fix some user-visible react.dev typos (only typos in this commit…
willy-b Nov 5, 2026
02acf3b
fix(docs): remove unncessary await from dispatchAction (#8674)
yousefdawood7 Nov 5, 2026
a003952
Link special HTML components to their React reference pages (#8596)
see-stack Nov 5, 2026
89e8328
Update conference listings for 2026 (#8218)
apherio Nov 5, 2026
c763eb2
Clarify that Transition Actions can be asynchronous (#8696)
yotatameguchi-boop Nov 5, 2026
00de546
Fix wrong link targets in react-dom docs (#8599)
see-stack Nov 5, 2026
391e70b
Use relative links, without domain, in reference docs (#8712)
ShakilUrRehman21 Nov 5, 2026
1f691ff
Fix API Reference link to point to /reference/react (#8603)
see-stack Nov 5, 2026
f9e9ed3
Fix broken and incorrect reference links (#8600)
see-stack Nov 5, 2026
b87d2bd
Fix redundant /index in static API links (#8602)
see-stack Nov 5, 2026
2e6dca1
docs: explain useFormStatus with custom form actions (#8683)
Felix-ming Nov 5, 2026
dd5e98c
Fix relative links missing leading slash in Learn docs (#8568)
MyGO-Mujica Nov 7, 2026
058f805
fix: consistent note object type in Server Components docs (#8475)
Ashutosh0x Nov 7, 2026
523831c
Fix effect event name on useEffectEvent reference docs (#8303)
Amulya-Kumar Nov 7, 2026
557ce1d
Fix duplicate words in reference docs (#8626)
eknathdj Nov 7, 2026
7159560
Fix onHeaders argument type in prerenderToNodeStream docs (#8720)
hsusul Nov 7, 2026
024c049
Fix typo, memorized -> memoized in learn typescript useMemo docs (#8312)
n34k Nov 7, 2026
313083d
fix: remove unused useState import in lifecycle-of-reactive-effects (…
jahanzaib-iqbal-dev Nov 7, 2026
79e6763
Fix typo in react-labs-view-transitions-activity-and-more.md (#8357)
acutmore Nov 7, 2026
d4b8243
docs: change MutableRef to MutableRefObject in React 19 upgrade guide…
mihkeleidast Nov 7, 2026
de83f1d
Fix incorrect name of @vitejs/plugin-rsc package (#8202)
ulrichstark Nov 7, 2026
b886228
Remove unused useState import in StrictMode.md (#8190)
emersonpisoni Nov 7, 2026
4acb201
docs: fix incorrect article usage (a/an) (#8393)
seojcarlos Nov 7, 2026
e0ec287
Explain that the useState setter triggers a re-render in Quick Start …
benjaminkincses Nov 7, 2026
fb39485
fix: typo in useReducer documentation (#7314)
aaqib605 Nov 7, 2026
6fba260
Fix act() event example using button before declaration (#8593)
fbellinder Nov 7, 2026
652b25c
docs: fix typo in useActionState and remove redundant async in useTra…
0verflowed-stack Nov 7, 2026
50bdc1e
Clarify ref callback cleanup behavior in common ref docs (#8579)
smg99 Nov 8, 2026
1fb9f91
Pass options to createConnection in useEffect (#8533)
SupunSPWithana Nov 8, 2026
4089cc0
docs: add missing "of" in render tree diagram alt text (#8420)
imxv Nov 8, 2026
d013b51
typo on prerender.md (#7467)
andihaki Nov 8, 2026
331f7e3
docs: fix terminology - 'argument' to 'parameter' in tutorial (#8376)
cyphercodes Nov 8, 2026
f5fa1e8
docs: update lifecycle-of-reactive-effects.md (#8232)
jaem0629 Nov 8, 2026
7594a2b
Correct outdated contributor documentation (#8734)
aurorascharff Nov 9, 2026
d935c7f
Add missing docs for requestFormReset API (#8576)
smg99 Nov 11, 2026
46a54e0
Link form reset guidance to requestFormReset reference (#8753)
aurorascharff Nov 11, 2026
ee1bac9
merging all conflicts
react-translations-bot Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ contact_links:
url: https://github.com/react/react/issues/new/choose
about: This issue tracker is not for bugs in React. Please file React issues here.
- name: 🤔 Questions and Help
url: https://reactjs.org/community/support.html
url: https://react.dev/community
about: This issue tracker is not for support questions. Please refer to the React community's help and discussion forums.
4 changes: 2 additions & 2 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'
cache: yarn
cache-dependency-path: yarn.lock

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

- name: Install deps
run: yarn install --frozen-lockfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/site_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:
lint:
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 24.x
cache: yarn
cache-dependency-path: yarn.lock

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

- name: Install deps
run: yarn install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code when working with this repository.

## Project Overview

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

## Development Commands

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

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

Prettier is used for formatting (config in `.prettierrc`).
36 changes: 2 additions & 34 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,41 +38,9 @@ Ignore this if you're specifically describing `createElement`.

Ignore this if you're specifically writing about ES5.

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

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.

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.

#### Don't use features that aren't standardized yet.

For example, **don't** write this:

```js
class MyComponent extends React.Component {
state = {value: ''};
handleChange = (e) => {
this.setState({value: e.target.value});
};
}
```

Instead, **do** write this:

```js
class MyComponent extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.state = {value: ''};
}
handleChange(e) {
this.setState({value: e.target.value});
}
}
```

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

### Style

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ This repo contains the source code and documentation powering [react.dev](https:
### Prerequisites

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

### Installation

1. `cd react.dev` to go into the project root
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.
3. `yarn` to install the website's npm dependencies

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

### Test the change

Expand All @@ -57,7 +58,7 @@ The documentation is divided into several sections with a different tone and pur

## Translation

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

## License
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```js [[1, 1, "submitAction"]]
function UpdateName() {}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```js [[1, 3, "submitAction"]]
function submitAction() {}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```js [[1, 1, "submitAction"]]
function submitAction() {}
```

```js [[1, 1, "\\"hidden\\""]]
const mode = "hidden";
```
31 changes: 31 additions & 0 deletions eslint-local-rules/__tests__/lint-markdown-code-blocks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,37 @@ async function run() {
),
'expected malformed metadata to be replaced with canonical form'
);

const validHighlightResult = await lintFixture('valid-highlight.md');
assert.strictEqual(
validHighlightResult.messages.length,
0,
'expected a valid inline highlight to pass'
);

const missingHighlightResult = await lintFixture('missing-highlight.md');
assert.strictEqual(
missingHighlightResult.messages.length,
1,
'expected a highlight with text missing from its line to fail'
);
assert.strictEqual(
missingHighlightResult.messages[0].message,
"Could not find 'submitAction' on highlighted line 1"
);

const outOfBoundsHighlightResult = await lintFixture(
'out-of-bounds-highlight.md'
);
assert.strictEqual(
outOfBoundsHighlightResult.messages.length,
1,
'expected an out-of-bounds highlight line to fail'
);
assert.strictEqual(
outOfBoundsHighlightResult.messages[0].message,
'Code highlight line 3 is outside this code block'
);
}

run().catch(error => {
Expand Down
66 changes: 66 additions & 0 deletions eslint-local-rules/rules/inline-highlights.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

const INLINE_HIGHLIGHT_REGEX = /(\[\[.*\]\])/;

function validateInlineHighlights(meta, code) {
const match = INLINE_HIGHLIGHT_REGEX.exec(meta);
if (!match) {
return [];
}

let highlights;
try {
highlights = JSON.parse(match[1]);
} catch (error) {
return ['Code highlight metadata must be valid JSON'];
}

if (!Array.isArray(highlights)) {
return ['Code highlight metadata must be an array'];
}

const lines = code.split('\n');
const errors = [];

for (const highlight of highlights) {
if (!Array.isArray(highlight) || highlight.length < 3) {
errors.push('Each code highlight must specify a step, line, and text');
continue;
}

const [, lineNo, text, fromIndex] = highlight;
if (!Number.isInteger(lineNo) || lineNo < 1 || lineNo > lines.length) {
errors.push(`Code highlight line ${lineNo} is outside this code block`);
continue;
}
if (typeof text !== 'string') {
errors.push(`Code highlight text on line ${lineNo} must be a string`);
continue;
}

const line = lines[lineNo - 1];
let index = line.indexOf(text);
const lastIndex = line.lastIndexOf(text);
if (index !== lastIndex) {
if (fromIndex === undefined) {
errors.push(
`Found '${text}' twice on highlighted line ${lineNo}; specify fromIndex`
);
continue;
}
index = line.indexOf(text, fromIndex);
}
if (index === -1) {
errors.push(`Could not find '${text}' on highlighted line ${lineNo}`);
}
}

return errors;
}

module.exports = {validateInlineHighlights};
14 changes: 13 additions & 1 deletion eslint-local-rules/rules/lint-markdown-code-blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ const {
setCompilerExpectedLines,
} = require('./metadata');
const {normalizeDiagnostics} = require('./diagnostics');
const {validateInlineHighlights} = require('./inline-highlights');
const {parseMarkdownFile} = require('./markdown');
const {runReactCompiler} = require('./react-compiler');

module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Run React Compiler on markdown code blocks',
description: 'Validate and compile markdown code blocks',
category: 'Possible Errors',
},
fixable: 'code',
Expand All @@ -43,6 +44,17 @@ module.exports = {
const {blocks} = parseMarkdownFile(sourceCode.text, filename);
// For each supported code block, run the compiler and reconcile metadata.
for (const block of blocks) {
for (const message of validateInlineHighlights(
block.meta,
block.code
)) {
context.report({
node,
loc: block.position,
message,
});
}

const compilerResult = runReactCompiler(
block.code,
`${filename}#codeblock`
Expand Down
2 changes: 2 additions & 0 deletions eslint-local-rules/rules/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const {parseFenceMetadata} = require('./metadata');
* @property {{lineIndex: number, rawText: string, metaText: string, range: [number, number]}} fence
* @property {string} filePath
* @property {string} lang
* @property {string} meta
* @property {import('./metadata').FenceMetadata} metadata
*/

Expand Down Expand Up @@ -76,6 +77,7 @@ function parseMarkdownFile(content, filePath) {

blocks.push({
lang: rawLang || normalizedLang,
meta: node.meta || metaText.trim(),
metadata,
filePath,
code: node.value || '',
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prettier:diff": "yarn nit:source",
"lint-heading-ids": "node scripts/headingIdLinter.js",
"fix-headings": "node scripts/headingIdLinter.js --fix",
"ci-check": "npm-run-all prettier:diff --parallel lint tsc lint-heading-ids rss deadlinks",
"ci-check": "npm-run-all prettier:diff --parallel lint test:eslint-local-rules tsc lint-heading-ids rss deadlinks",
"tsc": "tsc --noEmit",
"start": "next start",
"postinstall": "yarn --cwd eslint-local-rules install && is-ci || husky install .husky",
Expand Down Expand Up @@ -93,7 +93,11 @@
"postcss-flexbugs-fixes": "4.2.1",
"postcss-preset-env": "^6.7.0",
"prettier": "^2.5.1",
<<<<<<< HEAD
"react-server-dom-webpack": "^19.2.5",
=======
"react-server-dom-webpack": "^19.3.0",
>>>>>>> 46a54e0592729712b7640308b53268e84fdc7c9f
"reading-time": "^1.2.0",
"remark": "^12.0.1",
"remark-external-links": "^7.0.0",
Expand All @@ -111,7 +115,7 @@
"webpack-bundle-analyzer": "^4.5.0"
},
"engines": {
"node": ">=16.8.0"
"node": ">=24"
},
"nextBundleAnalysis": {
"budget": null,
Expand Down
Loading
Loading