Repository navigation
docs(en): merge reactjs.org/main into zh-hans.reactjs.org/main @ 2e6dca16 - #1970
Open
docschina-bot wants to merge 74 commits into
Open
docschina-bot wants to merge 74 commits into
docschina-bot wants to merge 74 commits into
Conversation
* 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
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).
* 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>
* 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) * chore: trigger CLA check
Co-authored-by: Daksh Dhami <hi@lucii.xyz>
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>
…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
* Clarify use vs await * Refine based on feedback * Address review comments
Co-authored-by: Tuna <tuna@MacBookPro.station>
…505) * [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
* 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
* 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
* 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
…Leadership Council, and refresh membership. Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com>
* Resize long og image text * address feedback
Please accept my changes for React Alicante and CityJS Athens
* 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
…ule (#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>
…Effect reference (#8707) * Fix broken React Router link in "Synchronizing with Effects" * Fix broken React Router link in useEffect reference
… 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
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>
…age (#8571)" (#8729) This reverts commit 6be2e2a.
Co-authored-by: Iitian001 <Iitian001@users.noreply.github.com>
…#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>
* 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>
… (#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.
…) (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"
* 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>
* 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>
* 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
此 PR 自动生成。
合并 reactjs/reactjs.org 的修改至本仓库(@ 2e6dca1)
以下文件存在冲突,可能需要重新翻译:
请解决所有冲突后提交到此 pull request,可直接在 Github 修改、切换到 sync-2e6dca16 分支进行修改或者使用 Github Desktop 拉取此 pr 修改并提交。
禁止使用 Squash Merge 来合并此 Pull Request!
使用该操作会导致上游仓库的内容丢失,并致使下一次合并产生冲突。