Skip to content

Commit 51cf471

Browse files
jhonmikejackpopeMakenRosaaurorascharffrickhanlonii
authored
Sync with react.dev @ 46a54e0 (#1290)
* Expand FragmentInstance reference docs (#8309) * Clean up and expand fragment ref docs * Add cached intersection observer usage example * Expand focus example to show search * Small clean ups * Add FragmentInstance operations reference list * Add reference to scrollIntoView operation * Migrate examples to sandpack * Clarify useLayoutEffect setup timing (#8488) * Increase dark-mode button contrast (#8494) Bumps button contrast to match the treatment on reactnative.dev. Dark mode: - primary text: dark:text-secondary (#404756) -> dark:text-gray-90 (#23272F) - secondary border: #404756 -> #4E5769 (matches RN's rgb(78,86,104)) Light mode: - secondary border: #D9DBE3 -> #BCC1CD (matches RN's rgb(188,193,205)) gray-90 keeps a subtle cyan tint on the teal button, per review feedback (gray-95 was too flat). * Rewrite `use()` docs (#8305) * Claude use docs attempt * Human updates * Address review feedback * Address additional review feedback * Split Pitfall and DeepDive, clarify recreation examples * Reorder DeepDive: prose before correct example * Add Reading a Promise from context section * Address review feedback and align DeepDive with RSC docs style * Drop inaccurate claim about blocking page rendering * Address feedback * Address feedback: clarify use() accepts Promise or context * Apply suggestion from @rickhanlonii * Update src/content/reference/react/use.md Co-authored-by: Ricky <rickhanlonii@gmail.com> * [use] Add Pitfall on refetching Promises from context in RSCs --------- Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com> Co-authored-by: Aurora Scharff <66901228+aurorascharff@users.noreply.github.com> * [form] Document onSubmit event handler alongside action * [form] Refine onSubmit/action framing and address review * fix: update use.md pitfall to make conditional calling clearer (#8499) * fix: update use.md pitfall to mention that bypassing use can corrupt React's internal state tracking * Apply suggestion from @rickhanlonii * Apply suggestion from @rickhanlonii * Apply suggestion from @rickhanlonii * Apply suggestion from @rickhanlonii * Update use.md with caution on bypassing `use` Add warning about bypassing `use` and its effects on React Suspense. * Apply suggestion from @rickhanlonii * Update guidance on using the `use` hook with Promises Clarify usage of `use` hook regarding Promise handling. * Clarify usage of `use` with Promises --------- Co-authored-by: Ricky <rickhanlonii@gmail.com> * Fix broken internal link in Component reference (anchor) (#8344) * Fix broken internal link in Component reference (anchor) * chore: trigger CLA check * Fix incorrect links on versions page (#8461) * fix: remove unused useContext import in sandbox examples (#8509) Co-authored-by: Daksh Dhami <hi@lucii.xyz> * Update version entries (#8507) Co-authored-by: Daksh Dhami <hi@lucii.xyz> Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com> * Rewrite React Developer Tools section in tutorial-tic-tac-toe to use browser extension (#7726) * Rewrite React Developer Tools section in tutorial-tic-tac-toe CodeSandbox doesn't seem to support any platform React Developer Tools as is seen in tutorial. This section is rewritten to use the browser extension directly on the preview. * Fixed the preview URL to the codesandbox instance just before this section * Tweak tutorial DevTools instructions (#8514) * Fix startTransition example to wrap setState after await (#8520) * [use] Rework await vs use DeepDive to fix inaccurate framing (#8521) * Clarify use vs await * Refine based on feedback * Address review comments * Fix slow demo preview height (#8517) Co-authored-by: Tuna <tuna@MacBookPro.station> * Update React repo owner (#8524) * [Suspense] Document what activates a boundary, with live examples (#8505) * [Suspense] Add 'What activates a Suspense boundary' section * [Suspense] Clarify image activation wording (review feedback) * Define "suspense-enabled-framework" * Update outdated framework-less data fetching note to reference use() * fix: clarify Suspense boundary activation and fallback behavior * Add code example * update styling * Cleanup caveat * add link to blogpost * Replace notes with link to suspense docs * Tweak caveat * Update caveat to clarify streaming behavior during server rendering * Address feedback * address feedback * Clarify documentation on Suspense-enabled frameworks * Update links and wording * Improve example * Clarify heading for Suspense-enabled frameworks section * Restructure page * Update to be docs compliant and clarify images * Address review feedback * Add more suspense examples * Add more examples * Clarify image loading behavior during <ViewTransition> updates in Suspense documentation * Enhance Suspense documentation with additional details on font and image loading during <ViewTransition> updates * Update * Enhance Suspense documentation with examples of stylesheet loading behavior and vanilla DOM comparison * agent review * [Suspense] Polish activation examples (#8525) * Polish Suspense activation examples - Move Canary badges into section headings and render them icon-only in the table of contents - Replace the image demo's text fallback with a profile skeleton - Add a combined example coordinating data, a stylesheet, a font, and an image behind one boundary, with a plain DOM comparison - Match skeleton dimensions to the revealed content * Make the combined example's data delay consistent between runs * [Suspense] Tune demo heights and section copy (#8526) * Tune Suspense demo heights, data delay, and DOM comparison wording * Make section openers stand alone and restore demo timing * Shrink image demo portraits so both cards fit without layout shift * Name the resources in the combined section opener * State the ViewTransition condition in the combined section opener * Align combined section opener with sibling sections * Frame font and image waiting as Suspense behavior gated on ViewTransition * Match the combined section opener to its sibling sections * Document the experimental defer prop * Reduce the combined example's data delay * tweak * docs: wrap state updates after await in startTransition (#8443) * Dynamic OG images for docs pages (#8527) * Add dynamic OG images for docs pages * Match OG card design to existing static images * Generate OG images statically at build time * Clean up orphaned lockfile entry * Show section label on OG cards and guard pages without a card * Center title and enlarge section label on OG cards * fix server functions page crashing on loading (#8531) * Restructure the Meet the Team page around React's working groups and Leadership Council, and refresh membership. Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com> * [og images] Resize long og image text (#8543) * Resize long og image text * address feedback * Add upcoming conferences for React and CityJS (#8438) Please accept my changes for React Alicante and CityJS Athens * Add conditional use warning deeplink (#8567) * Add/fix RN team member links (#8558) * Clarify Suspense link in useDeferredValue docs (#8591) * Fix YouTube video overflow on mobile (#8609) * Add cache, cacheSignal, and captureOwnerStack to the APIs overview (#8597) * Document browser-only rendering (#8582) * Document browser-only rendering Add the Canary browser API reference, including optional lazy reasons, server bailout reporting, fatal and abort behavior, navigation entries, and onBrowserBailout options for every streaming, resume, and prerender API that supports it. * Polish browser API docs and add live example * Document browser with use and Suspense --------- Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com> * Clarify browser-only rendering guidance (#8612) * Clarify browser-only rendering guidance * Polish browser-only guidance wording * Use Canary markers in browser guidance * Present browser as a use resource * Polish browser usage labels * Address browser guidance review * Clarify browser return value is opaque * Restore alternative wording * Restore hydration alternative wording * Focus use introduction on resources * Note stable browser cleanup * Fix stream demos on iOS Safari (#8613) * Pin matching React Canary versions in Sandpack demos (#8614) * Pin matching React Canary versions in Sandpack demos * Use cached Canary build in Sandpack demos * Improve the browser-only rendering example (#8616) * Improve browser-only rendering example * Clarify browser-only example action * Show browser-only fallback on reload * fix my entry on the team page, typo fixes (#8624) * Add a conditional browser query example (#8617) * Add conditional browser query example * Move browser query hook into its own example file * Use IndexedDB in conditional browser example * Clarify conditional browser rendering example * Polish browser rendering examples * Bridge conditional browser examples * Tighten conditional browser example intro * Use time zone for conditional browser example * Clarify conditional example transition * Lead conditional browser docs with time zone example * Address conditional browser rendering feedback * update * Clarify conditional browser control flow * Clarify conditional data fetching pattern * Clarify conditional rendering outcomes * Polish conditional browser examples * Clarify conditional query rendering * Align conditional browser guidance * Document missing react-dom server rendering and hydration options (#8632) * Document missing Fizz server rendering options and fix resume references This adds the `formState`, `importMap`, `onHeaders`, and `maxHeadersLength` options to the `renderToPipeableStream` and `renderToReadableStream` reference pages, documents the object form of `nonce` for separate script and style nonces, and adds `importMap`, `onHeaders`, and `maxHeadersLength` to the `prerender` and `prerenderToNodeStream` pages. All of these options are supported in stable releases but were never documented. The `resumeAndPrerender` entries on the `react-dom/static` index were marked as experimental-only even though they ship in stable releases, so the badge is removed, and the `resumeAndPrerender` intro destructured a `postpone` property that is actually called `postponed`. The `resumeToPipeableStream` page no longer documents a `signal` option because the Node.js implementation neither types nor reads it, and it now documents the `onAllReady` callback that the implementation does support. The same page referred to `resume` in its intro and Returns section where it meant `resumeToPipeableStream`, and the `react-dom/server` index linked both resume entries to the `renderToPipeableStream` page; they now point at their own pages. Co-Authored-By: Claude Code (kimi-k3[1m]) <noreply@anthropic.com> * Document the formState option for hydrateRoot This adds the `formState` option to the `hydrateRoot` reference. The option carries the form state produced by a Server Function form submission so that `useActionState` with a `permalink` returns the submitted state during hydration instead of the initial state, and it must match the `formState` passed to the server renderer. The option shipped in React 19.0 but was never documented. --------- Co-authored-by: Claude Code (kimi-k3[1m]) <noreply@anthropic.com> * Validate inline code highlight metadata in CI (#8645) * Validate inline code highlights in docs * Match MDX code highlight metadata parsing * Prepare site for React 19.3 release (#8649) * Document Strict Mode hydration behavior in React 19.3 (#8651) * Clarify error handling for standalone startTransition (#8648) * Clarify standalone startTransition error handling * Polish startTransition error handling docs * Describe startTransition differences neutrally * Clarify startTransition callback wording * Remove repeated startTransition caveat * Preserve existing startTransition guidance * Preserve useTransition error guidance * Update src/content/reference/react/useTransition.md Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com> * Clarify standalone startTransition error reporting --------- Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com> * Reword `browser()` Server Component caveat (#8652) * Update browser.md * Update browser.md * Add React Advanced London 2026 and React Summit US 2026 (#8608) * Add React Advanced London 2026 and React Summit US 2026 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Retrigger CI * Add React Day Berlin 2026, React Summit Asia 2027 and React Summit 2027 * Fix React Summit Asia 2027 dates * Add LinkedIn links for React Summit and React Day Berlin * Remove extra blank line between conference entries --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * Add an `<img>` API reference (#8658) * Document React-specific img behavior * Explain empty image source caveat * Add ViewTransition and addTransitionType to the reference indexes (#8673) Both became stable in React 19.3 and both have reference pages and sidebar entries, but neither is listed on its overview page: - `<ViewTransition>` is missing from Built-in React Components, which already lists its 19.3 sibling `<Activity>`. - `addTransitionType` is missing from Built-in React APIs, which already lists `cache`, `cacheSignal` and `captureOwnerStack`. CONTRIBUTING.md says the API Reference "is intended to be exhaustive", so a reader browsing either overview page currently can't discover either API. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * Use relative link, without domain, to Compiler docs (#8678) * Clarify image loading during View Transitions (#8671) * Clarify img View Transition example * Avoid redundant image alt text * Tighten img example introduction * Move img example outcome below demo * Clarify Suspense image example * Simplify View Transition comparison examples * Use a Suspense load in the image example * Align Suspense resource loading examples * Reduce View Transition example changes * Remove artificial image loading delay * Keep Suspense explanation self-contained * Scope shared examples to each API * Use Suspense for View Transition image example * Make image loading comparison visible * Tighten View Transition image examples * Document View Transition resource timeout * Cache image promises in Suspense examples * Fix Suspense resource demos * Clarify View Transition image reveal * Fix Suspense font loading example * Align image loading explanations * Address image documentation review * Simplify View Transition image guidance * Add React DevTools for agents reference page (#8694) * docs: document fetchPriority support for preloadModule and preinitModule (#8501) * docs: document fetchPriority support for preloadModule and preinitModule * Update src/content/reference/react-dom/preinitModule.md Co-authored-by: MaxwellCohen <to.email.max@gmail.com> * Update src/content/reference/react-dom/preloadModule.md Co-authored-by: MaxwellCohen <to.email.max@gmail.com> --------- Co-authored-by: Aurora Scharff <66901228+aurorascharff@users.noreply.github.com> Co-authored-by: MaxwellCohen <to.email.max@gmail.com> * Fix broken React Router links in "Synchronizing with Effects" and useEffect reference (#8707) * Fix broken React Router link in "Synchronizing with Effects" * Fix broken React Router link in useEffect reference * docs: add <form> to React DOM components overview (#8717) * Update conferences: move concluded Sep 2026 events to Past, fix React Conf Japan 2027 section (#8700) * Update conferences: move concluded Sep 2026 events to Past, fix React Conf Japan 2027 section * Update conferences: move concluded CityJS Athens 2026 to Past section * Update conferences: move concluded React Advanced London 2026 to Past section * Normalize aria-labels on TeamMember social links (#8592) Twitter, Threads, and Bluesky links already included the member's name in their aria-label, but GitHub and personal-site links used generic labels ("GitHub Profile", "Personal Site") with no name — inconsistent and confusing for screen reader users scanning the team page. Standardize all five link types to include the member's name, and mark their icons aria-hidden since the link's accessible name already conveys the same information. Fixes #8552 Co-authored-by: Claude <noreply@anthropic.com> * docs: Add useOptimistic hook description to hooks reference page (#8571) * Revert "docs: Add useOptimistic hook description to hooks reference page (#8571)" (#8729) This reverts commit 6be2e2a. * docs: add useOptimistic to Built-in React Hooks overview (#8625) Co-authored-by: Iitian001 <Iitian001@users.noreply.github.com> * Add missing 2026 conferences (#8730) * Fix Server Function examples for Actions, forms, and useActionState (#8538) * Fix Server Functions documentation examples * Fix code snippet highlights Corrected the index of 'submitAction' in the code snippet. * Clarify wording * Update section titles for clarity * Polish Server Functions examples: consistent headings, reset wording, transition comment - Convert the remaining two Usage headings to gerund form to match the rest of the page and react.dev convention (anchors unchanged) - Reset wording: "succeeds" + "the form's uncontrolled fields" (aligns with #8512) - Comment the startTransition-after-await; bump CodeStep line accordingly Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Polish Server Functions examples * Fix Server Functions code highlight --------- Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Update form documentation for forms default reset behavior (#8512) * Enhance form documentation for form default reset behavior * Reorder sections for better progressive disclosure of ideas * fix typos in form.md * Normalize MDN links in form.md * Standardized all Usage headings in form.md to imperative form * add useOptimistic reference * Standardize section headings in form.md to imperative form * revert 'action' prop change * Enhance form submission documentation by clarifying the use of the `action` prop and its behavior: - including the handling of `FormData`, - the necessity of `name` attributes, - the advantages of using a function over a URL. - removed redundant information about `e.preventDefault()` for the `action` prop. * clean up Handling form submission with an action prop * clean up preserving form values after submission * update code example for Handling multiple submission types * Clean up code example for Handling multiple submission types * update form documentation with more examples of keeping form values after submission * add useFormStatus to benefits of using Action * Move reset form section to the bottom of the page and update examples * updates based on pr feedback * Enhance form documentation by clarifying the `action` and `method` props, including details on handling form submissions with functions and the implications of using `formAction`. Update examples and caveats for better understanding of form behavior in React. * small cleanups * Refine form Action documentation * update Preserving form values after an Action section based on feedback * update on onSubmit vs action prop note * Enhance form documentation by expanding on the use of Server Functions in the `action` prop, including detailed examples for passing extra data and handling form submissions. Clarify the behavior of form elements and their interaction with `FormData`. * fixing onSubmit link and code example clean up * remove unneeded hidden items * Polish form documentation wording * Restore Transition link in form docs * Clarify form value preservation examples and guidance --------- Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com> * Fix Server Function signature and two typos in 'use server' reference (#8653) requestUsername is passed to useActionState but declared as requestUsername(formData). useActionState calls the action with the previous state as the first argument, so formData ends up null and formData.get('username') throws. The useActionState reference already covers this under "My Action cannot read form data". Also drop a stray semicolon in the LikeButton example, where it sits in the fragment's children and renders as text, and remove a duplicated word in the RSC banner so it matches use-client.md. * Just fix some user-visible react.dev typos (only typos in this commit) (no AI or LLM used) (#8702) Thanks to the React team for great documentation! As a way to give back, I would like to share some simple typo fixes (any other type of content issues found will be fixed in separate commits): - On https://react.dev/reference/react/useActionState (archived as is at https://web.archive.org/web/20261022181815/https://react.dev/reference/react/useActionState ) "quanitiy" should be "quantity". - On https://react.dev/reference/react/useContext (archived as is at https://web.archive.org/web/20261022181858/https://react.dev/reference/react/useContext ) "mistakingly" should be removed (the sentence already ends in "by mistake", and "mistakenly" would seem to be the intended word if that had not been the case) - On https://react.dev/reference/react/experimental_taintUniqueValue (archived as is at https://web.archive.org/web/20261022181913/https://react.dev/reference/react/experimental_taintUniqueValue ) "untained" should be "untainted" - On https://react.dev/reference/react-dom/flushSync (archived as is at https://web.archive.org/web/20261022184601/https://react.dev/reference/react-dom/flushSync ) "syncronous" should be "synchronous" - On https://react.dev/reference/react-dom/client/createRoot (archived as is at https://web.archive.org/web/20261022185916/https://react.dev/reference/react-dom/client/createRoot ) "specfied" should be "specified" - On https://react.dev/reference/react-dom/client/hydrateRoot (archived as is at https://web.archive.org/web/20261022190025/https://react.dev/reference/react-dom/client/hydrateRoot ) "specfied" should be "specified" - On https://react.dev/reference/react-dom/server/resume (archived as is at https://web.archive.org/web/20261022190141/https://react.dev/reference/react-dom/server/resume ) "immediated" should be "immediately" - https://react.dev/reference/dev-tools/react-performance-tracks (archived as is at https://web.archive.org/web/20261022190242/https://react.dev/reference/dev-tools/react-performance-tracks ) "addititional" should be "additional" - https://react.dev/reference/eslint-plugin-react-hooks/lints/use-memo (archived as is at https://web.archive.org/web/20261022190325/https://react.dev/reference/eslint-plugin-react-hooks/lints/use-memo ) "sychronizes" should be "synchronizes" - https://react.dev/versions (archived as is at https://web.archive.org/web/20261022190519/https://react.dev/versions ) "Specificaion" should be "Specification" - https://react.dev/reference/react/StrictMode (archived as is at https://web.archive.org/web/20261022190822/https://react.dev/reference/react/StrictMode ) "inital" should be "initial" * fix(docs): remove unncessary await from dispatchAction (#8674) * Link special HTML components to their React reference pages (#8596) * Update conference listings for 2026 (#8218) * Update conference listings for 2026 * update typo for cityjs singapore 2026 website * fix header typo for react india * remove duplicates from past 2025 conference * Update dates for React miami and react summit 2026 --------- Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com> * Clarify that Transition Actions can be asynchronous (#8696) * docs: clarify that Transition Actions can be asynchronous * Keep async Action clarification focused * Clarify sync and async Transition callbacks --------- Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com> * Fix wrong link targets in react-dom docs (#8599) * Use relative links, without domain, in reference docs (#8712) * Fix API Reference link to point to /reference/react (#8603) * Fix broken and incorrect reference links (#8600) * Fix redundant /index in static API links (#8602) * docs: explain useFormStatus with custom form actions (#8683) * 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> * Fix relative links missing leading slash in Learn docs (#8568) 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. * fix: consistent note object type in Server Components docs (#8475) 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. * Fix effect event name on useEffectEvent reference docs (#8303) * Fix duplicate words in reference docs (#8626) 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> * Fix onHeaders argument type in prerenderToNodeStream docs (#8720) * Fix typo, memorized -> memoized in learn typescript useMemo docs (#8312) * fix: remove unused useState import in lifecycle-of-reactive-effects (#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 * Fix typo in react-labs-view-transitions-activity-and-more.md (#8357) * docs: change MutableRef to MutableRefObject in React 19 upgrade guide (#8214) * Fix incorrect name of @vitejs/plugin-rsc package (#8202) * Remove unused useState import in StrictMode.md (#8190) Removed unused import of useState from React. * docs: fix incorrect article usage (a/an) (#8393) - 'an custom' -> 'a custom' in components/index.md (consonant sound) - 'a object' -> 'an object' in taintUniqueValue.md (vowel sound) * Explain that the useState setter triggers a re-render in Quick Start (#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: typo in useReducer documentation (#7314) * Fix act() event example using button before declaration (#8593) * 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> * docs: fix typo in useActionState and remove redundant async in useTransition (#8642) * Remove redundant async in useTransition documentation * Fix typo in useActionState hook documentation * Clarify ref callback cleanup behavior in common ref docs (#8579) * Clarify ref callback cleanup vs null behavior * docs: incorporate review feedback on ref callback cleanup * Pass options to createConnection in useEffect (#8533) * docs: add missing "of" in render tree diagram alt text (#8420) Co-authored-by: sunmozong <sunmozong@kuaishou.com> * typo on prerender.md (#7467) Co-authored-by: Ricky <rickhanlonii@gmail.com> * docs: fix terminology - 'argument' to 'parameter' in tutorial (#8376) 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. * docs: update lifecycle-of-reactive-effects.md (#8232) * Update lifecycle-of-reactive-effects.md * Remove useEffect from solution as well --------- Co-authored-by: Jaem <91131509+DarkChocoJaem@users.noreply.github.com> * Correct outdated contributor documentation (#8734) * Add missing docs for requestFormReset API (#8576) * Add requestFormReset React DOM reference page * docs: cross-link automatic and manual form resets * Restore unrelated upstream test formatting * Link form reset guidance to requestFormReset reference (#8753) * fix: resolve conflitos do sync com react.dev @ 46a54e0 Resolve os 182 blocos de conflito em 78 arquivos, mantendo o conteúdo atualizado do upstream traduzido para pt-BR. Também corrige heading IDs divergentes do upstream (Suspense.md e useEffectEvent.md) e os links que apontavam para eles. * docs: traduz conteúdo novo do sync com react.dev @ 46a54e0 Traduz para pt-BR o conteúdo em inglês trazido pelo sync fora dos blocos de conflito: - Páginas novas: blog React 19.3, browser, requestFormReset, <img>, React DevTools para agentes - Seções novas em use, Fragment, form, useFormStatus, Suspense, useActionState, hydrateRoot, createRoot, prerender, prerenderToNodeStream e react-dom/index - Comunidade: team, index e changelog do React 19 em versions --------- Co-authored-by: Jack Pope <jackpope1@gmail.com> Co-authored-by: Maken Cristhian <96421658+MakenRosa@users.noreply.github.com> Co-authored-by: Aurora Scharff <66901228+aurorascharff@users.noreply.github.com> Co-authored-by: Ricky <rickhanlonii@gmail.com> Co-authored-by: Aurora Scharff <aurora.sofie@gmail.com> Co-authored-by: MaxwellCohen <to.email.max@gmail.com> Co-authored-by: Srijan Dubey <87586713+Srijan-D@users.noreply.github.com> Co-authored-by: Jihwan <hanityx@gmail.com> Co-authored-by: Daksh Dhami <163955579+DakshSinghDhami@users.noreply.github.com> Co-authored-by: Daksh Dhami <hi@lucii.xyz> Co-authored-by: Sebastian Sebbie Silbermann <sebastian.silbermann@vercel.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com> Co-authored-by: Avinash N <vintas@users.noreply.github.com> Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Nabeel A. <Account@lushvista.cc> Co-authored-by: TunaDev <198469603+TunaDev0@users.noreply.github.com> Co-authored-by: Tuna <tuna@MacBookPro.station> Co-authored-by: Dushyant Acharya <dushyantacharya873@gmail.com> Co-authored-by: Matt Carroll <7158882+mattcarrollcode@users.noreply.github.com> Co-authored-by: Aristos Markogiannakis <aristos_m@hotmail.com> Co-authored-by: Ruslan Lesiutin <28902667+hoxyq@users.noreply.github.com> Co-authored-by: Alex Hunt <hello@alexhunt.dev> Co-authored-by: Laxmana Megalamani <laxmanmegalamani5@gmail.com> Co-authored-by: Nasser <sdnssr001@gmail.com> Co-authored-by: Josh Story <gnoff@storyposted.com> Co-authored-by: Bartosz Kaszubowski <gosimek@gmail.com> Co-authored-by: Sam Selikoff <sam.selikoff@gmail.com> Co-authored-by: Yadiel Vélez <16180439+hernan-yadiel@users.noreply.github.com> Co-authored-by: Artur Nikitsin <32310512+artur-nikitsin@users.noreply.github.com> Co-authored-by: Shivam S <152616194+BIGSUS24@users.noreply.github.com> Co-authored-by: Soichiro Miki <smiki-tky@umin.ac.jp> Co-authored-by: Ruslan Lesiutin <react@heyruslan.com> Co-authored-by: Kulwant Singh <147079325+coolwent@users.noreply.github.com> Co-authored-by: Roman Cherepanov <romach007@gmail.com> Co-authored-by: Yash Gupta <guptachinu354@gmail.com> Co-authored-by: SHAKIL UR REHMAN <137157095+ShakilUrRehman21@users.noreply.github.com> Co-authored-by: Deepu S Nath <deepusnath@gmail.com> Co-authored-by: martin rebo <martin@warteamx.com> Co-authored-by: Shreyash <160615932+Iitian001@users.noreply.github.com> Co-authored-by: Iitian001 <Iitian001@users.noreply.github.com> Co-authored-by: Stanislav (Stanley) Modrak <44023416+smith558@users.noreply.github.com> Co-authored-by: Viktor <38476233+BlackHatMan@users.noreply.github.com> Co-authored-by: Willy Bruns <adde.animulis@gmail.com> Co-authored-by: Yousef Dawood <78578298+yousefdawood7@users.noreply.github.com> Co-authored-by: Sahil Mhapsekar <saheel.mhapsekar@gmail.com> Co-authored-by: べろしてぃ <yota.tameguchi@gmail.com> Co-authored-by: SHAKIL UR REHMAN <rehmanshakil21@gmail.com> Co-authored-by: Felix <146006641+Felix-ming@users.noreply.github.com> Co-authored-by: Homura <1158270624@qq.com> Co-authored-by: Ashutosh Kumar Singh 王 <161562995+Ashutosh0x@users.noreply.github.com> Co-authored-by: Amulya Kumar <52869803+Amulya-Kumar@users.noreply.github.com> Co-authored-by: Eknath <eknath789@gmail.com> Co-authored-by: eknathdj <eknathdj@users.noreply.github.com> Co-authored-by: Henry Su <henrysu4707@gmail.com> Co-authored-by: n34k <109991419+n34k@users.noreply.github.com> Co-authored-by: Jahanzaib iqbal <78400134+jahanzaib-iqbal-dev@users.noreply.github.com> Co-authored-by: Ashley Claymore <aclaymore@bloomberg.net> Co-authored-by: Mihkel Eidast <mihkel@eida.st> Co-authored-by: Ulrich Stark <8657779+ulrichstark@users.noreply.github.com> Co-authored-by: Emerson Pisoni <emersonpisoni14@gmail.com> Co-authored-by: Juan Carlos Díaz <jcarlos@convertiam.com> Co-authored-by: Benjamin Kincses <beniakiraly105@gmail.com> Co-authored-by: Dextheking1 <Dextheking1@users.noreply.github.com> Co-authored-by: Aaqib Javaid <78491606+aaqib605@users.noreply.github.com> Co-authored-by: fbellinder <fred.bellinder@eqtpartners.com> Co-authored-by: 0verflowed-stack <143296066+0verflowed-stack@users.noreply.github.com> Co-authored-by: Sumit G <sumitg3767@gmail.com> Co-authored-by: Supun Withana <supunisback@gmail.com> Co-authored-by: imxv <sunmozong@gmail.com> Co-authored-by: sunmozong <sunmozong@kuaishou.com> Co-authored-by: andi hakim arif <andi.hakim.arif@gmail.com> Co-authored-by: Rayan Salhab <r.salhab@aiyexpertsolutions.com> Co-authored-by: Jaem <vanillajaem@gmail.com> Co-authored-by: Jaem <91131509+DarkChocoJaem@users.noreply.github.com> Co-authored-by: jhonmike <jhon.msdev@gmail.com>
2 parents ac83623 + 816f5bc commit 51cf471

156 files changed

Lines changed: 16091 additions & 8380 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.

‎.claude/skills/docs-writer-blog/SKILL.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ See [How to Upgrade to React X.Y](/blog/YYYY/MM/DD/react-xy-upgrade-guide) for s
159159

160160
### React {/*react*/}
161161

162-
* Add `useNewHook` for [purpose]. ([#12345](https://github.com/facebook/react/pull/12345) by [@contributor](https://github.com/contributor))
162+
* Add `useNewHook` for [purpose]. ([#12345](https://github.com/react/react/pull/12345) by [@contributor](https://github.com/contributor))
163163

164164
---
165165

@@ -603,7 +603,7 @@ npm install react@latest react-dom@latest
603603

604604
| Type | Pattern |
605605
|------|---------|
606-
| GitHub PR | `[#12345](https://github.com/facebook/react/pull/12345)` |
606+
| GitHub PR | `[#12345](https://github.com/react/react/pull/12345)` |
607607
| GitHub user | `[@username](https://github.com/username)` |
608608
| Twitter/X | `[@username](https://x.com/username)` |
609609
| Bluesky | `[Name](https://bsky.app/profile/handle)` |
@@ -623,8 +623,8 @@ For more information, see the docs for [`useActionState`](/reference/react/useAc
623623
### Bullet Pattern
624624

625625
```markdown
626-
* Add `useTransition` for concurrent rendering. ([#10426](https://github.com/facebook/react/pull/10426) by [@acdlite](https://github.com/acdlite))
627-
* Fix `useReducer` observing incorrect props. ([#22445](https://github.com/facebook/react/pull/22445) by [@josephsavona](https://github.com/josephsavona))
626+
* Add `useTransition` for concurrent rendering. ([#10426](https://github.com/react/react/pull/10426) by [@acdlite](https://github.com/acdlite))
627+
* Fix `useReducer` observing incorrect props. ([#22445](https://github.com/react/react/pull/22445) by [@josephsavona](https://github.com/josephsavona))
628628
```
629629

630630
**Structure:** `Verb` + backticked API + description + `([#PR](url) by [@user](url))`

‎.claude/skills/react-expert/SKILL.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This skill produces exhaustive documentation research on any React API or concep
3232
2. **React Source Code** - Warnings, errors, implementation details
3333
3. **Git History** - Commit messages with context
3434
4. **GitHub PRs & Comments** - Design rationale (via `gh` CLI)
35-
5. **GitHub Issues** - Confusion/questions (facebook/react + reactjs/react.dev)
35+
5. **GitHub Issues** - Confusion/questions (react/react + reactjs/react.dev)
3636
6. **React Working Group** - Design discussions for newer APIs
3737
7. **Flow Types** - Source of truth for type signatures
3838
8. **TypeScript Types** - Note discrepancies with Flow
@@ -51,7 +51,7 @@ First, ensure the React repo is available locally:
5151
if [ -d ".claude/react" ]; then
5252
cd .claude/react && git pull origin main
5353
else
54-
git clone --depth=100 https://github.com/facebook/react.git .claude/react
54+
git clone --depth=100 https://github.com/react/react.git .claude/react
5555
fi
5656
```
5757

@@ -71,8 +71,8 @@ Spawn these agents IN PARALLEL using the Task tool. Each agent receives the skep
7171
| test-explorer | Explore | Test files for usage patterns | Search `.claude/react/packages/*/src/__tests__/` for test files mentioning the topic. Extract actual usage examples WITH file paths and line numbers. |
7272
| source-explorer | Explore | Warnings/errors in source | Search `.claude/react/packages/*/src/` for console.error, console.warn, and error messages mentioning the topic. Document trigger conditions. |
7373
| git-historian | Explore | Commit messages | Run `git log --all --grep="<topic>" --oneline -50` in `.claude/react`. Read full commit messages for context. |
74-
| pr-researcher | Explore | PRs introducing/modifying API | Run `gh pr list -R facebook/react --search "<topic>" --state all --limit 20`. Read key PR descriptions and comments. |
75-
| issue-hunter | Explore | Issues showing confusion | Search issues in both `facebook/react` and `reactjs/react.dev` repos. Look for common questions and misunderstandings. |
74+
| pr-researcher | Explore | PRs introducing/modifying API | Run `gh pr list -R react/react --search "<topic>" --state all --limit 20`. Read key PR descriptions and comments. |
75+
| issue-hunter | Explore | Issues showing confusion | Search issues in both `react/react` and `reactjs/react.dev` repos. Look for common questions and misunderstandings. |
7676
| types-inspector | Explore | Flow + TypeScript signatures | Find Flow types in `.claude/react/packages/*/src/*.js` (look for `@flow` annotations). Find TS types in `.claude/react/packages/*/index.d.ts`. Note discrepancies. |
7777

7878
### Step 3: Agent Prompts
@@ -164,8 +164,8 @@ CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in PRs.
164164

165165
Your task: Find PRs that introduced or modified <TOPIC>.
166166

167-
1. Run: gh pr list -R facebook/react --search "<topic>" --state all --limit 20 --json number,title,url
168-
2. For promising PRs, read details: gh pr view <number> -R facebook/react
167+
1. Run: gh pr list -R react/react --search "<topic>" --state all --limit 20 --json number,title,url
168+
2. For promising PRs, read details: gh pr view <number> -R react/react
169169
3. Look for:
170170
- The original RFC/motivation
171171
- Design discussions in comments
@@ -189,7 +189,7 @@ CRITICAL: Do NOT rely on your prior knowledge. Only report what you find in issu
189189

190190
Your task: Find issues that reveal common confusion about <TOPIC>.
191191

192-
1. Search facebook/react: gh issue list -R facebook/react --search "<topic>" --state all --limit 20 --json number,title,url
192+
1. Search react/react: gh issue list -R react/react --search "<topic>" --state all --limit 20 --json number,title,url
193193
2. Search reactjs/react.dev: gh issue list -R reactjs/react.dev --search "<topic>" --state all --limit 20 --json number,title,url
194194
3. For each issue, identify:
195195
- What the user was confused about
@@ -199,7 +199,7 @@ Your task: Find issues that reveal common confusion about <TOPIC>.
199199
Format your output as:
200200
## Common Confusion
201201
### Issue #<number>: <title>
202-
**Repo:** <facebook/react or reactjs/react.dev>
202+
**Repo:** <react/react or reactjs/react.dev>
203203
**Confusion:** <what they misunderstood>
204204
**Resolution:** <correct understanding>
205205
**Gotcha:** <if applicable>

‎.github/ISSUE_TEMPLATE/config.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
contact_links:
22
- name: 📃 Bugs in React
3-
url: https://github.com/facebook/react/issues/new/choose
3+
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/discord_notify.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions: {}
88

99
jobs:
1010
check_maintainer:
11-
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
11+
uses: react/react/.github/workflows/shared_check_maintainer.yml@main
1212
permissions:
1313
# Used by check_maintainer
1414
contents: read

‎.github/workflows/label_core_team_prs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212

1313
jobs:
1414
check_maintainer:
15-
uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
15+
uses: react/react/.github/workflows/shared_check_maintainer.yml@main
1616
permissions:
1717
# Used by check_maintainer
1818
contents: read

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

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ public/rss.xml
4646

4747
# worktrees
4848
.worktrees/
49+
50+
# Generated OG images (scripts/generateOgImages.mjs)
51+
public/images/og/

‎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

0 commit comments

Comments
 (0)