Skip to content

Sync with react.dev @ f5fa1e82 - #153

Open
react-translations-bot wants to merge 743 commits into
mainfrom
sync-f5fa1e82
Open

react-translations-bot wants to merge 743 commits into
mainfrom
sync-f5fa1e82

Conversation

@react-translations-bot

Copy link
Copy Markdown
Collaborator

This PR was automatically generated.

Merge changes from react.dev at f5fa1e8

The following files have conflicts and may need new translations:

Please fix the conflicts by pushing new commits to this pull request, either by editing the files directly on GitHub or by checking out this branch.

DO NOT SQUASH MERGE THIS PULL REQUEST!

Doing so will "erase" the commits from main and cause them to show up as conflicts the next time we merge.

poteto and others added 30 commits August 28, 2025 18:14
The compiler rule is now enabled by default in 6.0.0-rc.2, so there is no longer a need to manually enable the compiler rule in user's eslint configs.
Co-authored-by: unknown <deepanshu.9dd@gmail.com~>
`a expensive` should be `an expensive`
Fix "documentatino" typo to "documentation" in comment about useOptimistic reference page.
…d example of the use API (#7767)

* Update "Deep Dive" in reusing-logic-with-custom-hooks.md with link to and example of the use API

* Remove mention of Server Components when explaining the use API

* Update src/content/learn/reusing-logic-with-custom-hooks.md

Co-authored-by: Ricky <rickhanlonii@gmail.com>

* fix: Correct which lines are highlighted in code example

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
The previous examples used a service called loremflickr.com to link to  placeholder images. Since that service is now down, I updated them to reference placecats.com instead, which we already use in other examples as well. placecats doesn't have the same random cat feature so I roughly approximated it in the example code.

Closes #7966
* Fix handleClick compiler intro example

* Use a note instead

* Update src/content/learn/react-compiler/introduction.md
* fix: changed source file names in docs from App.js, index.js and styles.css to src/ dir

* fix: updated wrong image with the correct one with current sandbox file structure

* refactor: reverted all formatting and just just mention src folder in introductory section

* Reverted changes tutorial-tic-tac-toe.md

* added enhanced image of sandbox
* docs: add flushSync Troubleshooting section

* Update src/content/reference/react-dom/flushSync.md

* oops

* Apply suggestions from code review

* formatting and pitfall

---------

Co-authored-by: Ricky <rickhanlonii@gmail.com>
Co-authored-by: Rick Hanlon <rickhanlonii@meta.com>
* correct IconExperimental naming and usage (from #7972)

Co-authored-by: Tuna <198469603+TunaDev0@users.noreply.github.com>

* Bump Activity to Canary in docs

---------

Co-authored-by: Tuna <198469603+TunaDev0@users.noreply.github.com>
Happened to notice we were still on an old version of the compiler. This PR upgrades us to use the latest RC.
Copied over our copyright script from the react repo. I made a small fix to handle shebangs.
* Add copyright script

Copied over our copyright script from the react repo. I made a small fix to handle shebangs.

* Update copyright on all files

Run the script.
…iler (#7988)

In react/react#34462 for example, we found an issue where the compiler was incorrectly validating an example straight from the docs.

In order to find more issues like this + also provide more feedback to doc authors on valid/invalid patterns, this PR adds a new local eslint rule which validates all markdown codeblocks containing components/hooks with React Compiler. An autofixer is also provided.

To express that a codeblock has an expected error, we can use the following metadata:

```ts
// pseudo type def
type MarkdownCodeBlockMetadata = {
    expectedErrors?: {
      'react-compiler'?: number[];
    };
  };
```

and can be used like so:

````
```js {expectedErrors: {'react-compiler': [4]}}
// ❌ setState directly in render
function Component({value}) {
  const [count, setCount] = useState(0);
  setCount(value); // error on L4
  return <div>{count}</div>;
}
```
````

Because this is defined as a local rule, we don't have the same granular reporting that `eslint-plugin-react-hooks` yet. I can look into that later but for now this first PR just sets us up with something basic.
ShakilUrRehman21 and others added 28 commits November 4, 2026 19:00
* docs: explain useFormStatus with custom form actions

Closes #8682.

Document when `useFormStatus().pending` is set for a `preventDefault()` submit handler that starts a Transition in the same event, and add a runnable example for a custom form action. The example also notes that this pattern does not reset the form automatically.

Validation: `yarn check-all` and `git diff --check` pass locally. The initial draft was prepared with AI assistance and reviewed against the React DOM tests and issue details.

* Polish useFormStatus onSubmit documentation

* Clarify pending status and link form reset guidance

* Shorten pending definition and link onSubmit guidance

* Link form submission and Transition references

* Make form pending-state headings parallel

---------

Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com>
Four links in Learn docs were missing the leading slash and would resolve to 404 paths. Every other internal link in the repo uses absolute paths.
Fixes #6933

The Server Components docs page had inconsistent handling of the note variable across 3 code examples. All examples now consistently treat note as an object with .authorId, .id, and .content properties.
Remove accidental repeated words in three reference pages:
- createRoot: 'can can' -> 'can'
- resumeAndPrerenderToNodeStream: 'a a' -> 'a'
- react-performance-tracks: 'the the' -> 'the'

Co-authored-by: eknathdj <eknathdj@users.noreply.github.com>
…#8483)

The ChatRoom.js sandpack in the "Fix a connection switch" challenge
imports useState but only uses useEffect. Remove the unused import
to avoid confusing learners.

Fixes #8231
Removed unused import of useState from React.
- 'an custom' -> 'a custom' in components/index.md (consonant sound)
- 'a object' -> 'an object' in taintUniqueValue.md (vowel sound)
…(#8667)

* Explain that the useState setter triggers a re-render in Quick Start

* Explain re-render behavior before naming it

---------

Co-authored-by: Dextheking1 <Dextheking1@users.noreply.github.com>
Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com>
* Fix act() dispatch example using button before it is defined

The event example called button.dispatchEvent before const button was declared, which would throw at runtime. Also drop it.only from the docs snippet.

* Highlight the full act event-dispatch block

---------

Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com>
…nsition (#8642)

* Remove redundant async in useTransition documentation

* Fix typo in useActionState hook documentation
* Clarify ref callback cleanup vs null behavior

* docs: incorporate review feedback on ref callback cleanup
Co-authored-by: sunmozong <sunmozong@kuaishou.com>
Co-authored-by: Ricky <rickhanlonii@gmail.com>
Fixes reactjs/react.dev#8375

The tutorial incorrectly used 'argument' when referring to the function
parameter  in the handleClick function declaration. In JavaScript:
- Parameter is the variable in the function declaration
- Argument is the actual value passed when calling the function

This change improves accuracy and helps learners understand the
distinction between these two important programming concepts.
* Update lifecycle-of-reactive-effects.md

* Remove useEffect from solution as well

---------

Co-authored-by: Jaem <91131509+DarkChocoJaem@users.noreply.github.com>
target="_blank"
className="underline"
rel="noopener noreferrer"
href={message}>

for (const fullPath of candidates) {
try {
const content = fs.readFileSync(fullPath, 'utf8');
let path = params?.errorCode || 'index';
let mdx;
try {
mdx = fs.readFileSync(rootDir + '/' + path + '.md', 'utf8');
target="_blank"
className="underline"
rel="noopener noreferrer"
href={message}>

This branch had an error being deployed

1 failed deployment
Preview — e9c34a0a Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.