简报·YT
← 返回 GitHub 动态
facebook/react · 📌 手动指定 已完成

facebook/react v19.3.0

2026-09-09 18:01 · ⭐ 25万 · GitHub Release 原文 ↗
#React #版本发布 #视图过渡

facebook/react v19.3.0

一句话概括:React 19.3 是一次以 View Transition 动画能力(<ViewTransition /> + addTransitionType)、<Fragment /> 的 Ref 支持、以及 react-dom 新增服务端/浏览器分流 API browser() 为核心的功能版本,同时附带 Fast Refresh、Performance Tracks、Activity、SSR 与 RSC 的大量修复和性能优化。

新增能力

修复内容

Breaking Change 与迁移注意

性能相关

▸ Release Notes 英文原文(28486 字符)
Below is a list of all new features, APIs, and bug fixes. Read the [React 19.3 release post](https://react.dev/blog/2026/09/09/react-19-3) for more information. ## New React Features - `<ViewTransition />`: Adds `<ViewTransition />` and `addTransitionType` APIs to power View Transition animations in React (@sebmarkbage, @jackpope, @gaearon: [#31975](https://github.com/facebook/react/pull/31975), [#31987](https://github.com/facebook/react/pull/31987), [#31996](https://github.com/facebook/react/pull/31996), [#31999](https://github.com/facebook/react/pull/31999), [#32001](https://github.com/facebook/react/pull/32001), [#32002](https://github.com/facebook/react/pull/32002), [#32028](https://github.com/facebook/react/pull/32028), [#32029](https://github.com/facebook/react/pull/32029), [#32031](https://github.com/facebook/react/pull/32031), [#32034](https://github.com/facebook/react/pull/32034), [#32038](https://github.com/facebook/react/pull/32038), [#32041](https://github.com/facebook/react/pull/32041), [#32050](https://github.com/facebook/react/pull/32050), [#32090](https://github.com/facebook/react/pull/32090), [#32105](https://github.com/facebook/react/pull/32105), [#32254](https://github.com/facebook/react/pull/32254), [#32379](https://github.com/facebook/react/pull/32379), [#32422](https://github.com/facebook/react/pull/32422), [#32462](https://github.com/facebook/react/pull/32462), [#32540](https://github.com/facebook/react/pull/32540), [#32545](https://github.com/facebook/react/pull/32545), [#32585](https://github.com/facebook/react/pull/32585), [#32599](https://github.com/facebook/react/pull/32599), [#32611](https://github.com/facebook/react/pull/32611), [#32612](https://github.com/facebook/react/pull/32612), [#32617](https://github.com/facebook/react/pull/32617), [#32651](https://github.com/facebook/react/pull/32651), [#32653](https://github.com/facebook/react/pull/32653), [#32656](https://github.com/facebook/react/pull/32656), [#32664](https://github.com/facebook/react/pull/32664), [#32699](https://github.com/facebook/react/pull/32699), [#32723](https://github.com/facebook/react/pull/32723), [#32734](https://github.com/facebook/react/pull/32734), [#32751](https://github.com/facebook/react/pull/32751), [#32752](https://github.com/facebook/react/pull/32752), [#32760](https://github.com/facebook/react/pull/32760), [#32761](https://github.com/facebook/react/pull/32761), [#32764](https://github.com/facebook/react/pull/32764), [#32772](https://github.com/facebook/react/pull/32772), [#32790](https://github.com/facebook/react/pull/32790), [#32819](https://github.com/facebook/react/pull/32819), [#32820](https://github.com/facebook/react/pull/32820), [#32822](https://github.com/facebook/react/pull/32822), [#32833](https://github.com/facebook/react/pull/32833), [#32849](https://github.com/facebook/react/pull/32849), [#33094](https://github.com/facebook/react/pull/33094), [#33191](https://github.com/facebook/react/pull/33191), [#33200](https://github.com/facebook/react/pull/33200), [#33206](https://github.com/facebook/react/pull/33206), [#33293](https://github.com/facebook/react/pull/33293), [#33330](https://github.com/facebook/react/pull/33330), [#33331](https://github.com/facebook/react/pull/33331), [#33332](https://github.com/facebook/react/pull/33332), [#33357](https://github.com/facebook/react/pull/33357), [#33362](https://github.com/facebook/react/pull/33362), [#33433](https://github.com/facebook/react/pull/33433), [#33576](https://github.com/facebook/react/pull/33576), [#34374](https://github.com/facebook/react/pull/34374), [#34450](https://github.com/facebook/react/pull/34450), [#34481](https://github.com/facebook/react/pull/34481), [#34500](https://github.com/facebook/react/pull/34500), [#34502](https://github.com/facebook/react/pull/34502), [#34510](https://github.com/facebook/react/pull/34510), [#34511](https://github.com/facebook/react/pull/34511), [#34539](https://github.com/facebook/react/pull/34539), [#35567](https://github.com/facebook/react/pull/35567), [#35564](https://github.com/facebook/react/pull/35564), [#35485](https://github.com/facebook/react/pull/35485), [#35380](https://github.com/facebook/react/pull/35380), [#35063](https://github.com/facebook/react/pull/35063), [#35060](https://github.com/facebook/react/pull/35060), [#34676](https://github.com/facebook/react/pull/34676), [#36917](https://github.com/facebook/react/pull/36917), [#35337](https://github.com/facebook/react/pull/35337), [#35520](https://github.com/facebook/react/pull/35520)) - Fragment Refs: Add Refs to `<Fragment />` to support composable platform behavior (@jackpope, @sebmarkbage, @eps1lon, @Dhakshin2007, @chirokas, @teamleaderleo, @fallintoplace: [#32465](https://github.com/facebook/react/pull/32465), [#32613](https://github.com/facebook/react/pull/32613), [#32619](https://github.com/facebook/react/pull/32619), [#32654](https://github.com/facebook/react/pull/32654), [#32660](https://github.com/facebook/react/pull/32660), [#32682](https://github.com/facebook/react/pull/32682), [#32722](https://github.com/facebook/react/pull/32722), [#32813](https://github.com/facebook/react/pull/32813), [#32814](https://github.com/facebook/react/pull/32814), [#33056](https://github.com/facebook/react/pull/33056), [#33058](https://github.com/facebook/react/pull/33058), [#33093](https://github.com/facebook/react/pull/33093), [#34069](https://github.com/facebook/react/pull/34069), [#34103](https://github.com/facebook/react/pull/34103), [#34544](https://github.com/facebook/react/pull/34544), [#34545](https://github.com/facebook/react/pull/34545), [#37062](https://github.com/facebook/react/pull/37062), [#37061](https://github.com/facebook/react/pull/37061), [#37060](https://github.com/facebook/react/pull/37060), [#36047](https://github.com/facebook/react/pull/36047), [#36010](https://github.com/facebook/react/pull/36010), [#35642](https://github.com/facebook/react/pull/35642), [#35641](https://github.com/facebook/react/pull/35641), [#35637](https://github.com/facebook/react/pull/35637), [#35630](https://github.com/facebook/react/pull/35630), [#34935](https://github.com/facebook/react/pull/34935), [#37457](https://github.com/facebook/react/pull/37457), [#37408](https://github.com/facebook/react/pull/37408), [#37326](https://github.com/facebook/react/pull/37326), [#37251](https://github.com/facebook/react/pull/37251), [#37171](https://github.com/facebook/react/pull/37171), [#37169](https://github.com/facebook/react/pull/37169), [#37168](https://github.com/facebook/react/pull/37168), [#37167](https://github.com/facebook/react/pull/37167), [#37166](https://github.com/facebook/react/pull/37166), [#37165](https://github.com/facebook/react/pull/37165), [#37164](https://github.com/facebook/react/pull/37164), [#37163](https://github.com/facebook/react/pull/37163), [#37162](https://github.com/facebook/react/pull/37162), [#37161](https://github.com/facebook/react/pull/37161), [#37160](https://github.com/facebook/react/pull/37160), [#37125](https://github.com/facebook/react/pull/37125), [#37063](https://github.com/facebook/react/pull/37063)) ## New React DOM Features - `browser()`: a new `react-dom` API that returns a usable which errors during server rendering and resolves in the browser. `use(browser())` inside a `<Suspense>` boundary marks a subtree as browser-only without reporting a recoverable error (@gnoff: [#37143](https://github.com/facebook/react/pull/37143), [#37241](https://github.com/facebook/react/pull/37241)) - Added an `onBrowserBailout` option to the `react-dom/server` APIs to observe when a subtree defers to the browser (@gnoff [#37193](https://github.com/facebook/react/pull/37193)) ## Notable changes - Enable Trusted Types API integration (@rickhanlonii [#35816](https://github.com/facebook/react/pull/35816)) - Transitions now render independently instead of being entangled into a single render, so a slow transition no longer holds up unrelated ones (@acdlite [#37290](https://github.com/facebook/react/pull/37290)) - Added a DEV-only warning when a component appears to have been unblocked by calling `use()` conditionally (@hoxyq, @eps1lon: [#37104](https://github.com/facebook/react/pull/37104), [#37203](https://github.com/facebook/react/pull/37203), [#37491](https://github.com/facebook/react/pull/37491)) ## All Changes ### React - Fast Refresh Fixes - Fix Fast Refresh to find and remount edits to components wrapped behind `lazy()` (@sophiebits [#36965](https://github.com/facebook/react/pull/36965)) - Fix Fast Refresh so edits to a `memo()` comparison function take effect (@sophiebits [#36964](https://github.com/facebook/react/pull/36964)) - Fix Fast Refresh crash when an edit changes the kind of a component's type (@sophiebits [#36963](https://github.com/facebook/react/pull/36963)) - Unify hot reload type resolution for Fast Refresh (@sophiebits [#36962](https://github.com/facebook/react/pull/36962)) - Fix Fast Refresh to remount correctly when an edit changes the component kind (@sophiebits [#36950](https://github.com/facebook/react/pull/36950)) - Double invoke effects in StrictMode after Fast Refresh (@eps1lon [#35962](https://github.com/facebook/react/pull/35962)) - Performance Track Fixes - Prevent crash when accessing `$$typeof` in Performance Tracks (@eps1lon [#35679](https://github.com/facebook/react/pull/35679)) - Handle non-string function names in Performance Tracks (@eps1lon [#35659](https://github.com/facebook/react/pull/35659)) - Use minus (`-`) instead of en dash for removed props in Performance Tracks (@eps1lon [#35649](https://github.com/facebook/react/pull/35649)) - Handle arrays with bigints in deep objects in Performance Tracks (@eps1lon [#35648](https://github.com/facebook/react/pull/35648)) - Don't enumerate typed array props in Performance Tracks in DEV (@UditDewan [#36913](https://github.com/facebook/react/pull/36913)) - Bail out of diffing wide objects and arrays in Performance Tracks (@eps1lon [#34742](https://github.com/facebook/react/pull/34742)) - Clear potentially large performance measures in DEV (@hoxyq [#34803](https://github.com/facebook/react/pull/34803)) - Fix missing else branch for renders with no props change in Performance Tracks (@hoxyq [#34837](https://github.com/facebook/react/pull/34837)) - Activity Fixes - Fix `useSyncExternalStore` missing store mutations that happened while an Activity tree was hidden (@sophiebits [#36947](https://github.com/facebook/react/pull/36947)) - Hide portal contents when an Activity is hidden (@acdlite [#35091](https://github.com/facebook/react/pull/35091)) - Prevent metadata hoisting in hidden `<Activity>` trees (@ronnakamoto [#34983](https://github.com/facebook/react/pull/34983)) - Prevent errors thrown inside a hidden Activity from escaping to the visible UI (@acdlite [#35074](https://github.com/facebook/react/pull/35074)) - Don't unhide a node if a direct parent Offscreen is still hidden (@sebmarkbage [#34821](https://github.com/facebook/react/pull/34821)) - Don't show internal `<Offscreen>` component in error messages (@rickhanlonii [#35763](https://github.com/facebook/react/pull/35763)) - Warn in DEV when a component appears to have been unblocked by a conditional `use()` (@hoxyq, @eps1lon: [#37104](https://github.com/facebook/react/pull/37104), [#37203](https://github.com/facebook/react/pull/37203), [#37491](https://github.com/facebook/react/pull/37491)) - Render transitions independently instead of entangling them into a single render (@acdlite [#37290](https://github.com/facebook/react/pull/37290)) - Fix hang when updating a dehydrated boundary inside a hidden tree (@gaearon [#37135](https://github.com/facebook/react/pull/37135)) - Don't reacquire Host Singletons during dev effect validation (@gnoff [#37113](https://github.com/facebook/react/pull/37113)) - Only remove properties from Host Singletons on release (@gnoff [#37112](https://github.com/facebook/react/pull/37112)) - Don't invoke effects on moved children in StrictMode (@sophiebits [#36948](https://github.com/facebook/react/pull/36948)) - Throw a clearer error when a rejected Promise is incorrectly instrumented (@eps1lon [#36328](https://github.com/facebook/react/pull/36328)) - Fix context propagation into Suspense fallbacks (@acdlite [#36160](https://github.com/facebook/react/pull/36160)) - Fix context propagation through suspended Suspense boundaries (@acdlite [#35839](https://github.com/facebook/react/pull/35839)) - Fix `useDeferredValue` getting stuck (@gaearon [#36134](https://github.com/facebook/react/pull/36134)) - Update `useActionState` error message to say "action state" instead of "form state" (@rickhanlonii [#35790](https://github.com/facebook/react/pull/35790)) - Don't warn when rendering data block scripts (@eps1lon [#35953](https://github.com/facebook/react/pull/35953)) - Treat fibers with alternates as mounted in `getNearestMountedFiber` (@sebmarkbage [#35578](https://github.com/facebook/react/pull/35578)) - Always instrument the lazy initializer thenable (@gnoff [#35521](https://github.com/facebook/react/pull/35521)) - Annotate cascading updates for DevTools performance tracks in DEV (@huntie [#34961](https://github.com/facebook/react/pull/34961)) - Resolve the `.default` export of a `React.lazy` as the canonical value (@sebmarkbage [#34906](https://github.com/facebook/react/pull/34906)) - Limit owner stacks to 10 frames (@eps1lon [#34864](https://github.com/facebook/react/pull/34864)) - Ensure `useEffectEvent` reads latest values in `forwardRef` and `memo()` components (@eps1lon [#34831](https://github.com/facebook/react/pull/34831)) ### React DOM - Copy `source` onto the synthetic `toggle` event (@lazerg [#37389](https://github.com/facebook/react/pull/37389)) - Update HTML parser rules for the new `<select>` parser (@josepharhar [#34804](https://github.com/facebook/react/pull/34804)) - Update `defaultValue` for `type="number"` inputs to match other input types (@sophiebits [#36980](https://github.com/facebook/react/pull/36980)) - Avoid setting `innerHTML` when it hasn't changed (@sophiebits [#36949](https://github.com/facebook/react/pull/36949)) - Forward the `nonce` option in `ReactDOM.preloadModule()` (@UditDewan [#36851](https://github.com/facebook/react/pull/36851)) - Support `fetchPriority` for module resources (@TheAlexLichter [#36835](https://github.com/facebook/react/pull/36835)) - Track stylesheet preloads when explicitly preloaded to avoid unnecessary suspension (@gnoff [#36386](https://github.com/facebook/react/pull/36386)) - Suggest correct casing for the misspelled `credentialless` iframe attribute (@vmx906 [#36322](https://github.com/facebook/react/pull/36322)) - Add `credentialless` as a recognized boolean attribute for iframes (@vmx906 [#36148](https://github.com/facebook/react/pull/36148)) - Prevent reentrant `finishedTask` from calling `completeAll` multiple times (@gnoff [#36287](https://github.com/facebook/react/pull/36287)) - Update the CSS shorthand property list (@kidonng [#35636](https://github.com/facebook/react/pull/35636)) - Support the `maskType` SVG prop (@sleitor [#35921](https://github.com/facebook/react/pull/35921)) - Add support for `onFullscreenChange` and `onFullscreenError` events (@chirokas [#34621](https://github.com/facebook/react/pull/34621)) - Include `submitter` in `submit` events (@eps1lon [#35590](https://github.com/facebook/react/pull/35590)) - Fire `onReset` when automatically resetting forms (@eps1lon [#35176](https://github.com/facebook/react/pull/35176)) - Use the `FormData` `submitter` parameter (@jenseng [#29028](https://github.com/facebook/react/pull/29028)) - Fix form status reset when component state is updated (@eps1lon [#34075](https://github.com/facebook/react/pull/34075)) - Batch updates from `resize` events until the next frame (@eps1lon [#35117](https://github.com/facebook/react/pull/35117)) ### React Server - Add `nonce` to rendered import maps (@mattcosta7 [#37339](https://github.com/facebook/react/pull/37339)) - Add an `onBrowserBailout` option to observe subtrees that defer to the browser (@gnoff [#37193](https://github.com/facebook/react/pull/37193)) - Stop the caller's signal from retaining a finished render (@unstubbable [#37315](https://github.com/facebook/react/pull/37315)) - Construct the render lifetime controller only when it is needed (@unstubbable [#37357](https://github.com/facebook/react/pull/37357)) - Fix `react-dom/server` hanging on Deno (@fraidev [#35235](https://github.com/facebook/react/pull/35235)) - Extend stack overflow recovery to retries in SSR (@jackpope [#36977](https://github.com/facebook/react/pull/36977)) - Fix false-positive hydration mismatch on `nonce` attributes (@MaxwellCohen [#37030](https://github.com/facebook/react/pull/37030)) - Guard shell-error callbacks instead of nulling them out on the request (@eps1lon [#36916](https://github.com/facebook/react/pull/36916)) - Stop firing `onAllReady` after the shell errored (@eps1lon [#36903](https://github.com/facebook/react/pull/36903)) - Treat an incomplete tree as an error during error recovery (@acdlite [#36911](https://github.com/facebook/react/pull/36911)) - Fix non-script `modulepreload` tracking (@fallintoplace [#36564](https://github.com/facebook/react/pull/36564)) - Finalize postponed `nextSegmentId` after the prelude flush (@gaojude [#36779](https://github.com/facebook/react/pull/36779)) - Preserve `referrerPolicy` in image preload headers (@ulises-jeremias [#36803](https://github.com/facebook/react/pull/36803)) - Allow pending work to specialize abort reasons (@gnoff [#36586](https://github.com/facebook/react/pull/36586)) - Abort tasks that suspend after aborting during render (@gnoff [#36585](https://github.com/facebook/react/pull/36585)) - Finish abort in a scheduled task (@gnoff [#36580](https://github.com/facebook/react/pull/36580)) - Fix aborts during resumed rendering (@gnoff [#36584](https://github.com/facebook/react/pull/36584)) - Track abort state on the request (@gnoff [#36583](https://github.com/facebook/react/pull/36583)) - Model external work scheduling explicitly in the fb bundle (@gnoff [#36576](https://github.com/facebook/react/pull/36576)) - Continue reporting aborted task errors after a fatal abort (@gnoff [#36575](https://github.com/facebook/react/pull/36575)) - Disallow abort reentrancy (@gnoff [#36574](https://github.com/facebook/react/pull/36574)) - Stop transpiling computed property names (@eps1lon [#36542](https://github.com/facebook/react/pull/36542)) - Fix crash when capturing the callsite of a stalled `use()` of a rejected Flight chunk (@lubieowoce [#36544](https://github.com/facebook/react/pull/36544)) - Double invoke effects in Strict Mode during hydration (@eps1lon [#35961](https://github.com/facebook/react/pull/35961)) - Add additional task reentrancy protections in Fizz (@gnoff [#36291](https://github.com/facebook/react/pull/36291)) - Don't outline Suspense boundaries with suspensey CSS during shell flush (@gnoff [#35824](https://github.com/facebook/react/pull/35824)) - Push a stalled `use()` to the owner stack and debug task (@eps1lon [#35226](https://github.com/facebook/react/pull/35226)) - Fix `useId` tracking on replay (@gnoff [#35518](https://github.com/facebook/react/pull/35518)) - Correctly handle replaying when hydrating (@gnoff [#35494](https://github.com/facebook/react/pull/35494)) - Simplify the `createSuspenseBoundary` path (@sebmarkbage [#35087](https://github.com/facebook/react/pull/35087)) - Unify preamble-only fields to save a field on Suspense boundaries (@sebmarkbage [#35068](https://github.com/facebook/react/pull/35068)) - Unify prerender-only fields to save a field on Suspense boundaries (@sebmarkbage [#35067](https://github.com/facebook/react/pull/35067)) - Push halted awaits to the owner stack for late-arriving I/O info (@unstubbable [#35019](https://github.com/facebook/react/pull/35019)) - Include all Node.js APIs in the Bun entrypoint for `react-dom/server` (@RiskyMH [#34193](https://github.com/facebook/react/pull/34193)) - Detach a Suspense boundary after flushing its segment (@gnoff [#34694](https://github.com/facebook/react/pull/34694)) ### React Server Components - Keep an element pending while a referenced row is resolving (@unstubbable [#37542](https://github.com/facebook/react/pull/37542)) - Fix `RangeError` from exponential debug info growth (@unstubbable [#37481](https://github.com/facebook/react/pull/37481)) - Abort the cache signal when debug objects are retained (@unstubbable [#37342](https://github.com/facebook/react/pull/37342)) - Transfer key validation of lazy nodes when they are unwrapped (@unstubbable [#37258](https://github.com/facebook/react/pull/37258)) - Add `pending_weak` to the Flight thenable protocol (@acdlite [#37154](https://github.com/facebook/react/pull/37154)) - Outline and dedupe repeated strings (@gaearon [#37147](https://github.com/facebook/react/pull/37147)) - Port Reply Server traversal guards to the Flight Client (@eps1lon [#37144](https://github.com/facebook/react/pull/37144)) - Define Flight chunk `.then` with `Object.defineProperty` (@eps1lon [#37109](https://github.com/facebook/react/pull/37109)) - Support Turbopack's experimental array format for chunks (@sampoder [#37095](https://github.com/facebook/react/pull/37095)) - Limit fake JSX call site stacks to 10 frames (@timneutkens [#37086](https://github.com/facebook/react/pull/37086)) - Improve performance when decoding Flight replies (@gnoff [#37090](https://github.com/facebook/react/pull/37090)) - Recognize Node 22+ V8 frames for `Promise` statics in debug info (@gaearon [#36969](https://github.com/facebook/react/pull/36969)) - Tailor the warning for binary data serialized through `toJSON` (Node `Buffer`) (@unstubbable [#36873](https://github.com/facebook/react/pull/36873)) - Resolve models before `JSON.stringify` for faster serialization (@mhart [#36795](https://github.com/facebook/react/pull/36795)) - Prune debug info when chunks error (@gnoff [#36782](https://github.com/facebook/react/pull/36782)) - Avoid main-thread stalls from large debug strings (@unstubbable [#36570](https://github.com/facebook/react/pull/36570)) - Fix stranded row content under Node stream backpressure (@unstubbable [#36516](https://github.com/facebook/react/pull/36516)) - Fix dropped `FormData` entries in `decodeReplyFromBusboy` (@unstubbable [#36468](https://github.com/facebook/react/pull/36468)) - Harden types and improve performance of Flight replies (@eps1lon [#36425](https://github.com/facebook/react/pull/36425)) - Add more cycle protections to Flight replies (@eps1lon [#36236](https://github.com/facebook/react/pull/36236)) - Transport `AggregateError.errors` (@eps1lon [#36156](https://github.com/facebook/react/pull/36156)) - Bail out early when a backing entry for `Blob` deserialization is not a `Blob` (@eps1lon [#36055](https://github.com/facebook/react/pull/36055)) - Clear chunk reason after successful module initialization (@unstubbable [#36024](https://github.com/facebook/react/pull/36024)) - Add support for transporting `Error.cause` (@eps1lon [#35810](https://github.com/facebook/react/pull/35810)) - Walk parsed JSON instead of using a reviver for faster RSC payload parsing (@timneutkens [#35776](https://github.com/facebook/react/pull/35776)) - Skip `transferReferencedDebugInfo` during debug info resolution (@unstubbable [#35795](https://github.com/facebook/react/pull/35795)) - Add `unstable_allowPartialStream` option to Flight Client (@unstubbable [#35731](https://github.com/facebook/react/pull/35731)) - Fix `encodeReply` for JSX with temporary references (@unstubbable [#35730](https://github.com/facebook/react/pull/35730)) - Fix debug channel flag in Node.js `renderToPipeableStream` (@feedthejim [#35724](https://github.com/facebook/react/pull/35724)) - Fix stack overflow in `visitAsyncNode` with deep async chains (@unstubbable [#35612](https://github.com/facebook/react/pull/35612)) - Allow Server Components to render context providers from client modules (@rickhanlonii [#35675](https://github.com/facebook/react/pull/35675)) - Allow overriding `request.timeOrigin` via `options.startTime` (@lubieowoce [#35598](https://github.com/facebook/react/pull/35598)) - Warn once if `eval` is disabled in the dev environment (@eps1lon [#35661](https://github.com/facebook/react/pull/35661)) - Restore original function name in dev server callstacks served with `unsafe-eval` (@eps1lon [#35650](https://github.com/facebook/react/pull/35650)) - Fix `react-markup` types for server references (@eps1lon [#35634](https://github.com/facebook/react/pull/35634)) - Add more DoS mitigations to Flight replies and harden Flight (@unstubbable [#35632](https://github.com/facebook/react/pull/35632)) - Allow cyclic references to be serialized when unwrapping lazy elements (@unstubbable [#35471](https://github.com/facebook/react/pull/35471)) - Improve cyclic thenable detection in Flight reply server (@cvan20191 [#35369](https://github.com/facebook/react/pull/35369)) - Add extra loop protection to Flight reply server (@sebmarkbage [#35351](https://github.com/facebook/react/pull/35351)) - Patch Promise cycles and `toString` on Server Functions (@sebmarkbage [#35345](https://github.com/facebook/react/pull/35345)) - Move `react-server-dom-webpack/*.unbundled` to private `react-server-dom-unbundled` (@eps1lon [#35290](https://github.com/facebook/react/pull/35290)) - Never parse `then` functions in Flight replies (@sebmarkbage [#35289](https://github.com/facebook/react/pull/35289)) - Patch Flight reply server with fixes from Flight Client (@sebmarkbage [#35277](https://github.com/facebook/react/pull/35277)) - Complete the list of Node.js internal Promise awaits (@eps1lon [#35161](https://github.com/facebook/react/pull/35161)) - Reduce risk of maximum call stack exceeded when emitting async sequences (@eps1lon [#35159](https://github.com/facebook/react/pull/35159)) - Fix pending chunks count for streams and async iterables in DEV (@unstubbable [#35143](https://github.com/facebook/react/pull/35143)) - Fix broken byte stream parsing caused by buffer detachment (@unstubbable [#35127](https://github.com/facebook/react/pull/35127)) - Fix `hasReadable` flag in Node.js clients' debug channel (@unstubbable [#35039](https://github.com/facebook/react/pull/35039)) - Fix debug info filtering to include later resolved I/O (@unstubbable [#35036](https://github.com/facebook/react/pull/35036)) - Cache the value when visiting the same I/O or Promise along different paths (@sebmarkbage [#35005](https://github.com/facebook/react/pull/35005)) - Clone subsequent I/O nodes when resolved more than once (@sebmarkbage [#35003](https://github.com/facebook/react/pull/35003)) - Fix hang after resolving cyclic references (@unstubbable [#34988](https://github.com/facebook/react/pull/34988)) - Allow passing DEV-only `startTime` as an option (@sebmarkbage [#34912](https://github.com/facebook/react/pull/34912)) - Ignore bound-anonymous-fn resources as they're not considered I/O (@sebmarkbage [#34911](https://github.com/facebook/react/pull/34911)) - Fix detached `ArrayBuffer` error when streaming typed arrays (@unstubbable [#34849](https://github.com/facebook/react/pull/34849)) - Exclude RSC stream if the stream resolves in a task (@sebmarkbage [#34838](https://github.com/facebook/react/pull/34838)) - Forward the current environment when forwarding I/O entries (@sebmarkbage [#34836](https://github.com/facebook/react/pull/34836)) - Look for moved debug info when logging component performance track (@sebmarkbage [#34839](https://github.com/facebook/react/pull/34839)) - Respect `displayName` of Promise instances on the server (@sebmarkbage [#34825](https://github.com/facebook/react/pull/34825)) - Avoid unnecessary indirection when serializing debug info (@unstubbable [#34797](https://github.com/facebook/react/pull/34797)) - Fix preload `as` attribute for stylesheets (@unstubbable [#34760](https://github.com/facebook/react/pull/34760)) - Don't serialize `toJSON` in debug path and omit wide arrays (@sebmarkbage [#34759](https://github.com/facebook/react/pull/34759)) - Add support for `<Activity>` (@eps1lon [#34697](https://github.com/facebook/react/pull/34697))
▸ 主项目介绍 · facebook/react
▸ README 原文(同步于 2026-07-19 13:23)
# [React](https://react.dev/) &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/react.svg?style=flat)](https://www.npmjs.com/package/react) [![(Runtime) Build and Test](https://github.com/facebook/react/actions/workflows/runtime_build_and_test.yml/badge.svg)](https://github.com/facebook/react/actions/workflows/runtime_build_and_test.yml) [![(Compiler) TypeScript](https://github.com/facebook/react/actions/workflows/compiler_typescript.yml/badge.svg?branch=main)](https://github.com/facebook/react/actions/workflows/compiler_typescript.yml) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://legacy.reactjs.org/docs/how-to-contribute.html#your-first-pull-request) React is a JavaScript library for building user interfaces. * **Declarative:** React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug. * **Component-Based:** Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep the state out of the DOM. * **Learn Once, Write Anywhere:** We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using [Node](https://nodejs.org/en) and power mobile apps using [React Native](https://reactnative.dev/). [Learn how to use React in your project](https://react.dev/learn). ## Installation React has been designed for gradual adoption from the start, and **you can use as little or as much React as you need**: * Use [Quick Start](https://react.dev/learn) to get a taste of React. * [Add React to an Existing Project](https://react.dev/learn/add-react-to-an-existing-project) to use as little or as much React as you need. * [Create a New React App](https://react.dev/learn/start-a-new-react-project) if you're looking for a powerful JavaScript toolchain. ## Documentation You can find the React documentation [on the website](https://react.dev/). Check out the [Getting Started](https://react.dev/learn) page for a quick overview. The documentation is divided into several sections: * [Quick Start](https://react.dev/learn) * [Tutorial](https://react.dev/learn/tutorial-tic-tac-toe) * [Thinking in React](https://react.dev/learn/thinking-in-react) * [Installation](https://react.dev/learn/installation) * [Describing the UI](https://react.dev/learn/describing-the-ui) * [Adding Interactivity](https://react.dev/learn/adding-interactivity) * [Managing State](https://react.dev/learn/managing-state) * [Advanced Guides](https://react.dev/learn/escape-hatches) * [API Reference](https://react.dev/reference/react) * [Where to Get Support](https://react.dev/community) * [Contributing Guide](https://legacy.reactjs.org/docs/how-to-contribute.html) You can improve it by sending pull requests to [this repository](https://github.com/reactjs/react.dev). ## Examples We have several examples [on the website](https://react.dev/). Here is the first one to get you started: ```jsx import { createRoot } from 'react-dom/client'; function HelloMessage({ name }) { return <div>Hello {name}</div>; } const root = createRoot(document.getElementById('container')); root.render(<HelloMessage name="Taylor" />); ``` This example will render "Hello Taylor" into a container on the page. You'll notice that we used an HTML-like syntax; [we call it JSX](https://react.dev/learn#writing-markup-with-jsx). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. ## Contributing The main purpose of this repository is to continue evolving React core, making it faster and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React. ### [Code of Conduct](https://code.fb.com/codeofconduct) Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.fb.com/codeofconduct) so that you can understand what actions will and will not be tolerated. ### [Contributing Guide](https://legacy.reactjs.org/docs/how-to-contribute.html) Read our [contributing guide](https://legacy.reactjs.org/docs/how-to-contribute.html) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React. ### [Good First Issues](https://github.com/facebook/react/labels/good%20first%20issue) To help you get your feet wet and get you familiar with our contribution process, we have a list of [good first issues](https://github.com/facebook/react/labels/good%20first%20issue) that contain bugs that have a relatively limited scope. This is a great place to get started. ### License React is [MIT licensed](./LICENSE).
▸ 中文总结(生成于 2026-07-19 13:30)

facebook/react 项目介绍

一句话概括

React 是一个用于构建 Web 和原生用户界面的 JavaScript 库,其核心特点是声明式、组件化,并遵循“学习一次,随处编写”的设计理念。

项目核心信息

  • 项目名称: React
  • 仓库地址: facebook/react
  • 项目描述: The library for web and native user interfaces.
  • 主要语言: JavaScript
  • 许可证: MIT

这个项目是做什么的?

React 是一个用于构建用户界面的 JavaScript 库。它不假设你的技术栈中其他部分是什么,因此你可以用 React 开发新功能,而无需重写现有代码。React 不仅能在浏览器中运行,还能通过 Node 在服务端渲染,并通过 React Native 驱动移动端应用。

解决什么问题?

  • 声明式设计:React 让创建交互式 UI 变得简单。为应用的每个状态设计简洁的视图,当数据变化时,React 会高效地更新和渲染正确的组件。声明式视图让代码更可预测、更易理解和调试。
  • 组件化:构建封装了自身状态的组件,然后将它们组合成复杂的 UI。由于组件逻辑是用 JavaScript 而非模板编写的,你可以轻松地在应用中传递丰富的数据,并将状态保持在 DOM 之外。

核心技术架构/实现思路

  • 声明式渲染:开发者只需描述 UI 应该处于什么状态,React 负责高效地更新和渲染正确的组件。
  • 组件化架构:UI 被拆分成独立的、可复用的组件,每个组件管理自己的状态和渲染逻辑。
  • JSX 语法:React 使用一种类似 HTML 的语法扩展(称为 JSX),虽然不是必需的,但能让代码更易读,写起来像写 HTML 一样。
  • 渐进式采用:React 从一开始就被设计为可以逐步采用,你可以只使用你需要的 React 功能,无论是快速体验、添加到现有项目,还是创建全新的应用。

值得关注的技术亮点

  • 跨平台能力:支持服务端渲染(Node)和移动端应用(React Native),真正做到“学习一次,随处编写”。
  • 丰富的官方文档:包括快速入门、教程、状态管理、高级指南、API 参考等完整内容。
  • 活跃的社区贡献:项目在 GitHub 上开放开发,欢迎提交 pull request 和 bug 修复,并设有“Good First Issues”标签帮助新手参与贡献。
  • MIT 开源许可:完全开源,可自由使用和修改。

安装与使用示例

React 提供了多种使用方式: - 快速入门:使用 Quick Start 快速体验 React - 添加到现有项目:逐步引入 React - 创建新应用:使用强大的 JavaScript 工具链

一个简单的示例:

import { createRoot } from 'react-dom/client';

function HelloMessage({ name }) {
  return <div>Hello {name}</div>;
}

const root = createRoot(document.getElementById('container'));
root.render(<HelloMessage name="Taylor" />);

该示例会在页面上渲染出“Hello Taylor”。