-
Notifications
You must be signed in to change notification settings - Fork 47.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle info, group, and groupCollapsed in Strict Mode logging #25172
Handle info, group, and groupCollapsed in Strict Mode logging #25172
Conversation
While working on the new Next.js router which heavily relies on useReducer I noticed that `group` and `groupCollapsed` which both take labels were showing as-is in the console for the second render/dispatch in Strict Mode logs. While looking at the code I found that `info` was also not instrumented. I've added additional handling for: - `info` - `group` - `groupCollapsed`
thanks! some test is unhappy. |
Yeah it's the same failure as local... will investigate it further 😓 |
Should be good to land now 👍 |
If we are overriding |
I only added
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* Handle info, group, and groupCollapsed in Strict Mode logging While working on the new Next.js router which heavily relies on useReducer I noticed that `group` and `groupCollapsed` which both take labels were showing as-is in the console for the second render/dispatch in Strict Mode logs. While looking at the code I found that `info` was also not instrumented. I've added additional handling for: - `info` - `group` - `groupCollapsed` * Remove console.log * Fix tests
* Handle info, group, and groupCollapsed in Strict Mode logging While working on the new Next.js router which heavily relies on useReducer I noticed that `group` and `groupCollapsed` which both take labels were showing as-is in the console for the second render/dispatch in Strict Mode logs. While looking at the code I found that `info` was also not instrumented. I've added additional handling for: - `info` - `group` - `groupCollapsed` * Remove console.log * Fix tests
….1 October 13, 2022 * [standalone] Stop highlighting events when a component is selected ([tyao1](https://github.com/tyao1) in [facebook#25448](facebook#25448)) --- ### 4.26.0 September 16, 2022 * Show DevTools icons in Edge browser panel ([itskolli](https://github.com/itskolli) in [facebook#25257](facebook#25257)) * [Bugfix] Don't hide fragment if it has a key ([lunaruan](https://github.com/lunaruan) in [facebook#25197](facebook#25197)) * Handle info, group, and groupCollapsed in Strict Mode logging ([timneutkens](https://github.com/timneutkens) in [facebook#25172](facebook#25172)) * Highlight RN elements on hover ([tyao1](https://github.com/tyao1) in [facebook#25106](facebook#25106)) * Remove ForwardRef/Memo from display name if `displayName` is set ([eps1lon](https://github.com/eps1lon) in [facebook#21952](facebook#21952)) --- ### 4.25.0 July 13, 2022 * Timeline Profiler Sidebar with component tree ([lunaruan](https://github.com/lunaruan) and [blakef](https://github.com/blakef) in [facebook#24816](facebook#24816), [facebook#24815](facebook#24815), [facebook#24814](facebook#24814), [facebook#24805](facebook#24805), [facebook#24776](facebook#24776)) * [DevTools][Bugfix] Fix DevTools Perf Issue When Unmounting Large React Subtrees ([lunaruan](https://github.com/lunaruan) in [facebook#24863](facebook#24863)) * Enable "reload & profile" button for timeline view ([mondaychen](https://github.com/mondaychen) in [facebook#24702](facebook#24702)) * Find best renderer when inspecting app with mutilple react roots ([mondaychen](https://github.com/mondaychen) in [facebook#24665](facebook#24665)) * Only polyfill requestAnimationFrame when necessary ([mondaychen](https://github.com/mondaychen) in [facebook#24651](facebook#24651)) --- ### 4.24.7 May 31, 2022 * mock requestAnimationFrame with setTimeout as a temporary fix for facebook#24626 ([mondaychen](https://github.com/mondaychen) in [facebook#24633](facebook#24633)) * Fix formatWithStyles not styling the results if the first argument is an object + Added unit tests ([lunaruan](https://github.com/lunaruan) in [facebook#24554](facebook#24554)) --- ### 4.24.6 May 12, 2022 * fix a bug in console.log with non-string args ([mondaychen](https://github.com/mondaychen) in [facebook#24546](facebook#24546)) * Add Pragma to Only Run Tests if Version Requirement Satisfied ([lunaruan](https://github.com/lunaruan) in [facebook#24533](facebook#24533)) * [DevTools][Bug] Fix Race Condition When Unmounting Fibers ([lunaruan](https://github.com/lunaruan) in [facebook#24510](facebook#24510)) * [React DevTools] Improve DevTools UI when Inspecting a user Component that Throws an Error ([mondaychen](https://github.com/mondaychen) in [facebook#24248](facebook#24248)) --- ### 4.24.5 May 5, 2022 * Fixed potential undefined error in `TreeContext` reducer ([bvaughn](https://github.com/bvaughn) in [facebook#24501](facebook#24501)) * Fix error where Profiler sometimes incorrectlyed reported that a `forwardRef` did not render ([lunaruan](https://github.com/lunaruan) in [facebook#24494](facebook#24494)) * Fix regex for `formateWithStyles` function ([lunaruan](https://github.com/lunaruan) in [facebook#24486](facebook#24486)) * Fixed wrong method call for LRU cache ([bvaughn](https://github.com/bvaughn) in [facebook#24477](facebook#24477)) * Synchronize implementations of second render logging ([billyjanitsch](https://github.com/billyjanitsch) in [facebook#24381](facebook#24381)) * Don't stringify objects for console log second render ([lunaruan](https://github.com/lunaruan) in [facebook#24373](facebook#24373)) --- ### 4.24.4 April 8, 2022 * Allow react-devtools-inline `createStore()` method to override Store config params ([bvaughn](https://github.com/bvaughn) in [facebook#24303](facebook#24303)) * [ReactDebugTools] wrap uncaught error from rendering user's component ([mondaychen](https://github.com/mondaychen) in [facebook#24216](facebook#24216)) --- ### 4.24.3 March 29, 2022 #### Bugfix * Profiler should only report stateful hooks that change between renders ([bvaughn](https://github.com/bvaughn) in [facebook#24189](facebook#24189)) * Ignore duplicate welcome "message" events ([bvaughn](https://github.com/bvaughn) in [facebook#24186](facebook#24186)) * Attach DevTools Tree keyboard events to the Tree container (not the document) ([bvaughn](https://github.com/bvaughn) in [facebook#24164](facebook#24164)) --- ### 4.24.2 March 24, 2022 #### Bugfix * Show upgrade/downgrade instructions inline for errors thrown by the Store due to incompatible protocol (mismatched backend and frontend versions) ([bvaughn](https://github.com/bvaughn) in [facebook#24147](facebook#24147)) * Inspecting an element in a nested renderer no longer throws ([lunaruan](https://github.com/lunaruan) in [facebook#24116](facebook#24116)) --- ### 4.24.1 March 15, 2022 #### Bugfix * Disable unsupported Bridge protocol version dialog and add workaround for old protocol operations format ([bvaughn](https://github.com/bvaughn) in [facebook#24093](facebook#24093)) --- ### 4.24.0 March 10, 2022 #### Feature * Show DevTools backend and frontend versions in UI ([bvaughn](https://github.com/bvaughn) in [facebook#23399](facebook#23399)) * Timeline profiler refactored to support reading basic profiling data directly from React ([bvaughn](https://github.com/bvaughn) in [facebook#22529](facebook#22529)) #### Bugfix * Better handle undefined `Error` stacks in DevTools error boundary ([bvaughn](https://github.com/bvaughn) in [facebook#24065](facebook#24065)) * Fixed edge case bug in Profiler commit filtering ([bvaughn](https://github.com/bvaughn) in [facebook#24031](facebook#24031)) * Gracefully handle empty "xstyle" prop values ([lunaruan](https://github.com/lunaruan) in [facebook#23279](facebook#23279) and [bvaughn](https://github.com/bvaughn) in [facebook#23190](facebook#23190)) * Add `<TracingMarker>` component boilerplate ([lunaruan](https://github.com/lunaruan) in [facebook#23275](facebook#23275)) #### Misc * Remove object-assign polyfill ([sebmarkbage](https://github.com/sebmarkbage) in [facebook#23351](facebook#23351)) #### Breaking change * Move createRoot/hydrateRoot to react-dom/client ([sebmarkbage](https://github.com/sebmarkbage) in [facebook#23385](facebook#23385)). Technically this is a breaking change for projects using `react-devtools-inline`, but since this package already depends on the _experimental_ release channel, we are going to include it in 4.24. --- ### 4.23.0 January 24, 2022 #### Feature * DevTools: Only show StrictMode badge on root elements ([bvaughn](https://github.com/bvaughn) in [facebook#23012](facebook#23012)) #### Bugfix * Don't crawl unmounted subtrees when profiling starts ([bvaughn](https://github.com/bvaughn) in [facebook#23162](facebook#23162)) * Filter deleted components from the updaters list to avoid runtime errors later ([lunaruan](https://github.com/lunaruan) in [facebook#23156](facebook#23156)) #### Misc * DevTools (not React) logs Timeline performance data to the User Timing API ([bvaughn](https://github.com/bvaughn) in [facebook#23102](facebook#23102)) --- ### 4.22.1 December 14, 2021 * Fix invalid `require()` statements in `react-devtools-inline` ([bvaughn](https://github.com/bvaughn) in [facebook#22961](facebook#22961)) * Fix invalid `files` array in `react-devtools` `package.json` ([bvaughn](https://github.com/bvaughn) in [facebook#22960](facebook#22960)) --- ### 4.22.0 December 13, 2021 #### A note for React Native users React DevTools has [two main pieces](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md#overview): * The *frontend* users interact with (the Components tree, the Profiler, etc.). * The *backend* which runs in the same context as React itself. (In the web page with React DOM or shipped on the device with the React Native runtime.) This release updates the [**protocol** that DevTools uses](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md#serializing-the-tree) to communicate between the "frontend" and "backend" components. Because React Native embeds a copy of the React DevTools "backend" ([`react-devtools-core/backend`](https://www.npmjs.com/package/react-devtools-core)), the "frontend" (UI) needs to match. This means you may be prompted to upgrade (or downgrade) your React DevTools based on which version of React Native your app uses. #### Features * Support multiple DevTools instances per page ([@bvaughn](https://github.com/bvaughn) in [facebook#22949](facebook#22949)) * Advocate for StrictMode usage within Components tree ([@bvaughn](https://github.com/bvaughn) in [facebook#22886](facebook#22886)) * StyleX plug-in for resolving atomic styles to values for props.xstyle ([@bvaughn](https://github.com/bvaughn) in [facebook#22808](facebook#22808)) * Timeline search ([@bvaughn](https://github.com/bvaughn) in [facebook#22799](facebook#22799)) * Timeline: Improved snapshot view ([@bvaughn](https://github.com/bvaughn) in [facebook#22706](facebook#22706)) * Display root type for root updates in "what caused this update?" ([@eps1lon](https://github.com/eps1lon) in [facebook#22599](facebook#22599)) #### Bugfix * DevTools should inject itself for XHTML pages too (not just HTML) ([@bvaughn](https://github.com/bvaughn) in [facebook#22932](facebook#22932)) * Don't restore profiling data if we're profling ([@eps1lon](https://github.com/eps1lon) in [facebook#22753](facebook#22753)) * DevTools should properly report re-renders due to (use)context changes ([@bvaughn](https://github.com/bvaughn) in [facebook#22746](facebook#22746)) * Filter empty commits (all Fibers bailed out) from Profiler ([@bvaughn](https://github.com/bvaughn) in [facebook#22745](facebook#22745)) * Accept json file in import fileinput ([@jyash97](https://github.com/jyash97) in [facebook#22717](facebook#22717)) * Expose css vars to reach-ui portal components ([@jyash97](https://github.com/jyash97) in [facebook#22716](facebook#22716)) * Fix DevTools advanced tooltip display conditional check ([@bvaughn](https://github.com/bvaughn) in [facebook#22669](facebook#22669)) #### Misc * Emit new event when DevTools connects in standalone app ([@jstejada](https://github.com/jstejada) in [facebook#22848](facebook#22848)) --- ### 4.21.0 October 31, 2021 #### Features * Scheduling Profiler: Add marks for component effects (mount and unmount) ([@bvaughn](https://github.com/bvaughn) in [facebook#22578](facebook#22578)) * Scheduling Profiler: De-emphasize React internal frames ([bvaughn](https://github.com/bvaughn) in [facebook#22588](facebook#22588)) #### Bugfix * Revert logic for checking for duplicate installations of DevTools potentially causing issues loading Components tab ([@jstejada](https://github.com/jstejada) in [facebook#22638](facebook#22638)) * Scheduling Profiler does not warn about long transitions ([@bvaughn](https://github.com/bvaughn) in [facebook#22614](facebook#22614)) * Re-enable 'Reload and Start Profiling' for Microsoft Edge ([@eoandersson](https://github.com/eoandersson) in [facebook#22631](facebook#22631)) #### Misc * DevTools supports ENV-injected version for better internal bug reports ([@bvaughn](https://github.com/bvaughn) in [facebook#22635](facebook#22635)) * Fix typos ([@KonstHardy](https://github.com/KonstHardy) in [facebook#22494](facebook#22494)) --- ### 4.20.2 October 20, 2021 #### Bugfix * Dev Tools: Relax constraint on passing extensionId for backend init ([@jstejada](https://github.com/jstejada) in [facebook#22597](facebook#22597)) * DevTools: Fix passing extensionId in evaled postMessage calls ([@jstejada](https://github.com/jstejada) in [facebook#22590](facebook#22590)) --- ### 4.20.1 October 19, 2021 #### Bugfix * Only show DevTools warning about unrecognized build in Chrome ([@jstejada](https://github.com/jstejada) in [facebook#22571](facebook#22571)) * DevTools: Include Edge in browser name detection ([@jstejada](https://github.com/jstejada) in [facebook#22584](facebook#22584)) --- ### 4.20.0 October 15, 2021 #### Features * Allow to use the Profiler when no client is connected in standalone DevTools ([@gabrieltrompiz](https://github.com/gabrieltrompiz) in [facebook#22551](facebook#22551)) #### Bugfix * Surface backend errors during inspection in the frontend UI ([@bvaughn](https://github.com/bvaughn) in [facebook#22546](facebook#22546)) * Prevent splash page in standalone app from becoming unresponsive after the disconnection of a client (facebook#22558) ([@gabrieltrompiz](https://github.com/gabrieltrompiz) in [facebook#22560](facebook#22560)) * Prevent errors/crashing when multiple installs of DevTools are present ([@jstejada](https://github.com/jstejada) in [facebook#22517](facebook#22517)) * Update Fiber logic in backend renderer to match implementation in React ([@jstejada](https://github.com/jstejada) in [facebook#22527](facebook#22527)) #### Misc * Show warning in UI when duplicate installations of DevTools extension are detected ([@jstejada](https://github.com/jstejada) in [facebook#22563](facebook#22563)) * Improved filenames of built worker files ([@akgupta0777](https://github.com/akgupta0777) in [facebook#22559](facebook#22559)) --- ### 4.19.2 October 8, 2021 #### Bugfix * Show different error boundary UI for timeouts than normal errors ([bvaughn](https://github.com/bvaughn) in [facebook#22483](facebook#22483)) * Fixed bug where deleting a component filter would also close the settings modal ([Biki-das](https://github.com/Biki-das) in [facebook#22484](facebook#22484)) --- ### 4.19.1 October 1, 2021 #### Bugfix * Fixed potential cache miss when inspecting elements ([bvaughn](https://github.com/bvaughn) in [facebook#22472](facebook#22472)) --- ### 4.19.0 September 29, 2021 #### Features * Scheduling Profiler: Show Suspense resource .displayName ([bvaughn](https://github.com/bvaughn) in [facebook#22451](facebook#22451)) * Scheduling Profiler marks should include thrown Errors ([bvaughn](https://github.com/bvaughn) in [facebook#22419](facebook#22419)) * Don't patch console during first render in strict mode ([lunaruan](https://github.com/lunaruan) in [facebook#22308](facebook#22308)) * Show which hook indices changed when profiling for all builds ([bvaughn](https://github.com/bvaughn) in [facebook#22365](facebook#22365)) * Display actual ReactDOM API name in root type ([eps1lon](https://github.com/eps1lon) in [facebook#22363](facebook#22363)) * Add named hooks support to standalone and inline DevTools ([jstejada](https://github.com/jstejada) in [facebook#22320](facebook#22320) and [bvaughn](https://github.com/bvaughn) in [facebook#22263](facebook#22263)) #### Bugfix * DevTools encoding supports multibyte characters (e.g. "🟩") ([bvaughn](https://github.com/bvaughn) in [facebook#22424](facebook#22424)) * Improve DEV errors if string coercion throws (Temporal.*, Symbol, etc.) ([justingrant](https://github.com/justingrant) in [facebook#22064](facebook#22064)) * Fix memory leak caused by not storing alternate Fiber pointer ([bvaughn](https://github.com/bvaughn) in [facebook#22346](facebook#22346)) * Fix call stack exceeded error in `utfDecodeString()` ([bvaughn](https://github.com/bvaughn) in [facebook#22330](facebook#22330)) * Fix runtime error when inspecting an element times out ([jstejada](https://github.com/jstejada) in [facebook#22329](facebook#22329)) #### Performance * DevTools: Lazily parse indexed map sections ([bvaughn](https://github.com/bvaughn) in [facebook#22415](facebook#22415)) * DevTools: Hook names optimizations ([bvaughn](https://github.com/bvaughn) in [facebook#22403](facebook#22403)) * Replaced `network.onRequestFinished()` caching with `network.getHAR()` ([bvaughn](https://github.com/bvaughn) in [facebook#22285](facebook#22285)) --- ### 4.18.0 September 1, 2021 #### Features * DevTools: Improve named hooks network caching ([bvaughn](https://github.com/bvaughn) in [facebook#22198](facebook#22198)) * Console Logging for StrictMode Double Rendering ([lunaruan](https://github.com/lunaruan) in [facebook#22030](facebook#22030)) --- ### Bugfix * Fix react-devtools-inline size issues ([lunaruan](https://github.com/lunaruan) in [facebook#22232](facebook#22232)) * devtools: Don't display hook index of useContext ([eps1lon](https://github.com/eps1lon) in [facebook#22200](facebook#22200)) * Throw error in console without interfering with logs ([lunaruan](https://github.com/lunaruan) in [facebook#22175](facebook#22175)) --- ### 4.17.0 August 24, 2021 #### Features * Scheduling Profiler: Add network measures ([bvaughn](https://github.com/bvaughn) in [facebook#22112](facebook#22112)) * Add options for disabling some features ([hbenl](https://github.com/hbenl) in [facebook#22136](facebook#22136)) #### Bugfix * Fixed broken scroll-to error or warning feature ([bvaughn](https://github.com/bvaughn) and [eps1lon](https://github.com/eps1lon) in [facebook#22147](facebook#22147) and [facebook#22144](facebook#22144)) * Replaced WeakMap with LRU for inspected element cache ([bvaughn](https://github.com/bvaughn) in [facebook#22160](facebook#22160)) * Add more detailed error handling if profiling data does not have any React marks ([byronluk](https://github.com/byronluk) in [facebook#22157](facebook#22157)) * Various named hooks bug fixes ([jstejada](https://github.com/jstejada) in [facebook#22129](facebook#22129), [facebook#22128](facebook#22128), [facebook#22096](facebook#22096), and [facebook#22148](facebook#22148)) * Fix tooltip wheel event regression ([bvaughn](https://github.com/bvaughn) in [facebook#22130](facebook#22130)) * Replace `source-map` library with `source-map-js` for named hooks source map parsing ([bvaughn](https://github.com/bvaughn) in [facebook#22126](facebook#22126)) --- ### 4.16.0 August 16, 2021 #### Features * Scheduling Profiler: Inline snapshots ([bvaughn](https://github.com/bvaughn) in [facebook#22091](facebook#22091) and[bvaughn](https://github.com/bvaughn) in [facebook#22088](facebook#22088)) #### Bugfix * split parsing code to unblock Firefox release ([lunaruan](https://github.com/lunaruan) in [facebook#22102](facebook#22102)) * Scheduling profiler: Canvas views clip by default ([bvaughn](https://github.com/bvaughn) in [facebook#22100](facebook#22100)) * Fixed Components tree indentation bug for Chrome extension ([bvaughn](https://github.com/bvaughn) in [facebook#22083](facebook#22083)) --- ### 4.15.0 August 11, 2021 #### Features * Added new scheduling profiler tool ([bvaughn](https://github.com/bvaughn), [kartikcho](https://github.com/kartikcho), and [taneliang](https://github.com/taneliang) in [facebook#22006](facebook#22006), [facebook#21990](facebook#21990), [facebook#22013](facebook#22013), [facebook#21897](facebook#21897), [facebook#22029](facebook#22029), [facebook#22038](facebook#22038), [facebook#22043](facebook#22043), [facebook#21947](facebook#21947), [facebook#21966](facebook#21966), [facebook#21970](facebook#21970), [facebook#21971](facebook#21971), [facebook#21975](facebook#21975)). * Parsing source code for extracting names for hooks now happens in a worker ([tsirlucas](https://github.com/tsirlucas) in [facebook#21902](facebook#21902)). * Format hyperlink text as a clickable link ([kkragoth](https://github.com/kkragoth) in [facebook#21964](facebook#21964)). * Named hooks can now be extracted from extended source maps ([jstejada](https://github.com/jstejada) [facebook#22010](facebook#22010), [facebook#22073](facebook#22073)). * Hook indices now show up as a reason why a component rendered in the profiler ([mrkev](https://github.com/mrkev) in [facebook#22073](facebook#22073)). * Optimize images in DevTools ([ilhamsyahids](https://github.com/ilhamsyahids) in [facebook#21968](facebook#21968)). #### Bugfix * Named hooks cache is correctly cleared after Fast Refresh ([bvaughn](https://github.com/bvaughn) in [facebook#21891](facebook#21891)). * Hook names are correctly extracted when parsing nested hook calls ([jstejada](https://github.com/jstejada) in [facebook#22037](facebook#22037), [facebook#21996](facebook#21996)). * Highlight updates with memoized components ([Selnapenek](https://github.com/Selnapenek) in [facebook#22008](facebook#22008)). * Set app icon on MacOS ([christian-schulze](https://github.com/christian-schulze) in [facebook#21908](facebook#21908)). * Updated @reach packages to fix unmount bug ([bvaughn](https://github.com/bvaughn) in [facebook#22075](facebook#22075)). #### Misc * Refactor imperative theme code ([houssemchebeb](https://github.com/houssemchebeb) in [facebook#21950](facebook#21950)). * Change some remaining instances of master -> main ([shubham9411](https://github.com/shubham9411) in [facebook#21982](facebook#21982)). ##### Scheduling profiler ###### What is React working on? React’s previous Profiler primarily reports how fast (or slow) components are when rendering. It didn’t provide an overview of *what React is doing* (the actual cooperative scheduling bits). The new profiler does. It shows when components schedule state updates and when React works on them. It also shows how React categorizes and prioritizing what it works on. Here’s a profile for a simple app that uses only the legacy (synchronous) `ReactDOM.render` API. The profiler shows that all of the work scheduled and rendered by this app is done at *synchronous* priority: https://user-images.githubusercontent.com/29597/129042321-56985f5a-264e-4f3a-a8b7-9371d75c690f.mp4 Here’s a more interesting profile for an app that’s rendered at _default_ priority using the new [`createRoot` API](reactwg/react-18#5), then updates _synchronously_ in response to an “input” event to manage a ["controlled component"](https://reactjs.org/docs/forms.html#controlled-components): https://user-images.githubusercontent.com/29597/129074959-50912a63-0215-4be5-b51b-1e0004fcd2a1.mp4 Here’s part of a profile showing an idle app (no JavaScript running). In this case, React does some pre-rendering work for components that are “offscreen” (not currently displayed). https://user-images.githubusercontent.com/29597/128971757-612f232f-c64f-4447-a766-66a0516e8f49.mp4 Note that “offscreen” refers to a new API and set of features that we haven’t talked about much yet except for [some passing references](reactwg/react-18#18 (reply in thread)). We’ll talk more about it in future posts. ###### What are “transitions” and how do they work? We recently shared an update about the new [`startTransition` API](reactwg/react-18#41). This API helps apps feel responsive even when there are large updates by splitting the work into (1) a quick update to show that the app has received some input and (2) a slower update (the “transition”) that actually does any heavy lifting needed as a result of the input. Here is an example profile that uses the transition API. First React renders a small update that shows the user some visual feedback (like updating a controlled component or showing an inline loading indicator). Then it renders a larger update that, in this case, computes some expensive value. https://user-images.githubusercontent.com/29597/129079176-0995c8c0-e95a-4f44-8d55-891a7efa35c0.mp4 ###### How does Suspense impact rendering performance? You may have heard mention of “suspense” in past talks or seen it referenced [in our docs](https://reactjs.org/docs/react-api.html#suspense). Although full support for data fetching via Suspense is [expected to be released sometime after React 18.0](reactwg/react-18#47 (comment)), you can use Suspense today for things like lazy-loading React components. The new profiler shows when components suspend during render and how that impacts overall rendering performance. Here’s an example profile that suspends during the initial render to lazy-load a component using [`React.lazy`](https://reactjs.org/docs/code-splitting.html#reactlazy). While this component is loading, React shows a “fallback“ (placeholder UI). Once the component finishes loading, React retries the render and commits the final UI. https://user-images.githubusercontent.com/29597/129054366-2700e7e8-0172-4f61-9453-475acd740456.mp4 We plan to expand support for Suspense in the coming weeks to more explicitly show when suspense fallbacks are rendered and which subsequent renders are related to an initial update that suspended. ###### What else might cause a render to get delayed? Suspense can cause a render to get delayed as React waits for data to load, but React can also get stuck waiting on a lot of JavaScript to run. React profiling tools have previously focused on only reporting what React (or React components) are doing, but any JavaScript the browser runs affects performance. The new profiler shows non-React JavaScript as well, making it easy to see when it delays React from rendering. https://user-images.githubusercontent.com/29597/128971952-7c4e7e11-f4fb-497e-b643-4d9b3994b590.mp4 ###### What can you do to improve performance? Until now, DevTools (and the Profiler) has provided information without commentary. The new profiler takes a more active approach– highlighting where we think performance can be improved and providing suggestions. For example, suspending during an update is generally a bad user experience because it causes previously shown components to be unmounted (hidden) so the fallback can be shown while data loads. This can be avoided using the new [Transition API](reactwg/react-18#41). If you forget to add a transition to an update that suspends, the new profiler will warn you about this: https://user-images.githubusercontent.com/29597/128972228-3b23f01a-8017-43ad-b371-975ffed26c06.mp4 The new profiler also warns about scheduling a long, synchronous React update inside of event handler. https://user-images.githubusercontent.com/29597/128972000-d7477ba3-b779-46f2-b141-aaa712e9d6d2.mp4 Another thing the new profiler will warn about is long-running renders scheduled from layout effects (`useLayoutEffect` or `componentDidMount`/`componentDidUpdate`). These updates (called “nested updates”) are sometimes necessary to adjust layout before the browser paints, but they should be *fast*. Slow nested updates make the browser feel unresponsive. https://user-images.githubusercontent.com/29597/128972017-3ed0e682-751c-46fb-a6c5-271f255c8087.mp4 --- ### 4.14.0 July 17, 2021 #### Features * Display hook names for inspected components ([saphal1998](https://github.com/saphal1998), [VibhorCodecianGupta](https://github.com/VibhorCodecianGupta), [bvaughn](https://github.com/bvaughn), and [motiz88](https://github.com/motiz88) in [facebook#21641](facebook#21641), [facebook#21790](facebook#21790), [facebook#21814](facebook#21814), [facebook#21815](facebook#21815), [facebook#21831](facebook#21831), [facebook#21833](facebook#21833), [facebook#21835](facebook#21835), [facebook#21865](facebook#21865), [facebook#21871](facebook#21871), [facebook#21874](facebook#21874), [facebook#21891](facebook#21891)) * Control for manually toggling error boundaries ([baopham](https://github.com/baopham) in [facebook#21583](facebook#21583)) * Allow user to manually enter Profiler commit number to jump between commits ([srubin](https://github.com/srubin) in [facebook#19957](facebook#19957)) ##### Display hook names for inspected components ![DevTools parsing hook names](https://user-images.githubusercontent.com/29597/124013541-68c2cb00-d9b0-11eb-83ab-81a5180da46b.gif) ##### Control for manually toggling error boundaries ![DevTools error boundary toggle](https://user-images.githubusercontent.com/29597/125891522-30f0d99d-407f-4c31-b5a7-e9d0bd3fa554.gif) --- ### 4.13.5 May 25, 2021 #### Bugfix * Handle edge case where a component mounts before its "owner" (in DEV mode) that previously caused a validation error ([bvaughn](https://github.com/bvaughn) in [facebook#21562](facebook#21562)) --- ### 4.13.4 May 20, 2021 #### Bugfix * Fix edge-case Fast Refresh bug that caused Fibers with warnings/errors to be untracked prematurely (which broke componentinspection in DevTools) ([bvaughn](https://github.com/bvaughn) in [facebook#21536](facebook#21536)) * Revert force deep re-mount when Fast Refresh detected (was no longer necessary) ([bvaughn](https://github.com/bvaughn) in [facebook#21539](facebook#21539)) --- ### 4.13.3 May 19, 2021 #### Misc * Updated `react` and `react-dom` API imports in preparation for upcoming stable release ([bvaughn](https://github.com/bvaughn) in [facebook#21488](facebook#21488)) #### Bugfix * Reload all roots after Fast Refresh force-remount (to avoid corrupted Store state) ([bvaughn](https://github.com/bvaughn) in [facebook#21516](facebook#21516) and [facebook#21523](facebook#21523)) * Errors thrown by Store can be dismissed so DevTools remain usable in many cases ([bvaughn](https://github.com/bvaughn) in [facebook#21520](facebook#21520)) * Bugfix for `useState()` object with `hasOwnProperty` key ([bvaughn](https://github.com/bvaughn) in [facebook#21524](facebook#21524)) * Fixed string concatenation problem when a `Symbol` was logged to `console.error` or `console.warn` ([bvaughn](https://github.com/bvaughn) in [facebook#21521](facebook#21521)) * DevTools: Fixed version range NPM syntax ([bvaughn](https://github.com/bvaughn) in [9cf1069](facebook@9cf1069#diff)) * Tweaked DevTools error template title to match issue form template ([bvaughn](https://github.com/bvaughn) in [1a2d792](facebook@1a2d792)) --- ### 4.13.2 May 7, 2021 #### Misc * Improved bug report template to use new [GitHub issue forms](https://gh-community.github.io/issue-template-feedback/structured/) ([bvaughn](https://github.com/bvaughn) in [facebook#21450](facebook#21450)) --- ### 4.13.1 April 28, 2021 #### Bugfix * Improve display name logic for `React.memo` components ([bvaughn](https://github.com/bvaughn) in [facebook#21392](facebook#21392)) * Fixed potential runtime error with Suspense in versions <= 17 ([bvaughn](https://github.com/bvaughn) in [facebook#21432](facebook#21432)) * Errors thrown in the Store are no longer silent ([bvaughn](https://github.com/bvaughn) in [facebook#21426](facebook#21426)) #### Misc * Improved bug report template ([bvaughn](https://github.com/bvaughn) in [facebook#21413](facebook#21413)), [facebook#21421](facebook#21421)) --- ### 4.13.0 April 28, 2021 #### Features * Add Bridge protocol version backend/frontend ([bvaughn](https://github.com/bvaughn) in [facebook#21331](facebook#21331)) #### Bugfix * DevTools iterates over siblings during mount (rather than recursing) to avoid stack overflow errors ([bvaughn](https://github.com/bvaughn) in [facebook#21377](facebook#21377)) * Multiple error dialogs can be visible at once ([bvaughn](https://github.com/bvaughn) in [facebook#21370](facebook#21370)) * Console patching should handle Symbols without erroring ([bvaughn](https://github.com/bvaughn) in [facebook#21368](facebook#21368)) ###### Bridge protocol version backend/frontend During initialization, DevTools now checks to ensure it's compatible with the ["backend"](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md#overview) that's embedded within a renderer like React Native. If the two aren't compatible, upgrade instructions will be shown: <img width="400" height="233" alt="Dialog displaying downgrade instructions for the React DevTools frontend to connect to an older backend version" src="https://user-images.githubusercontent.com/29597/115997927-f77f2a00-a5b2-11eb-9098-20042b664cea.png"> <img width="400" height="233" alt="Dialog displaying upgrade instructions for the React DevTools frontend to connect to a newer backend version" src="https://user-images.githubusercontent.com/29597/115997965-167dbc00-a5b3-11eb-9cbc-082c65077a6e.png"> Learn more about this change at [fb.me/devtools-unsupported-bridge-protocol](https://fb.me/devtools-unsupported-bridge-protocol) --- ### 4.12.4 April 19, 2021 #### Bugfix * Remove `@octokit/rest` dependency because of a problem with transitive dependencies ([bvaughn](https://github.com/bvaughn) in [facebook#21317](facebook#21317)) --- ### 4.12.3 April 19, 2021 #### Bugfix * Wrapped quotation marks around Fiber ids or indices for all DevTools errors to better support GitHub fuzzy error search ([bvaughn](https://github.com/bvaughn) in [facebook#21314](facebook#21314)) --- ### 4.12.2 April 16, 2021 #### Bugfix * DevTools reliably suppresses console logs when generating component stacks ([bvaughn](https://github.com/bvaughn) in [facebook#21301](facebook#21301)) --- ### 4.12.1 April 14, 2021 Although this release is being made for all NPM packages, only the `react-devtools-inline` package contains changes. #### Bugfix * Fixed `react-devtools-inline` bug in frontend `initialize` method ([bvaughn](https://github.com/bvaughn) in [facebook#21265](facebook#21265)) --- ### 4.12.0 April 12, 2021 Although this release is being made for all NPM packages, only the `react-devtools-inline` package contains changes. #### Features * Added `createBridge` and `createStore` exports to the `react-devtools-inline/frontend` entrypoint to support advanced use cases ([bvaughn](https://github.com/bvaughn) in [facebook#21032](facebook#21032)) --- ### 4.11.1 April 11, 2021 #### Bugfix * Fixed broken import in `react-devtools-inline` for feature flags file ([bvaughn](https://github.com/bvaughn) in [facebook#21237](facebook#21237)) --- ### 4.11.0 April 9, 2021 #### Bugfix * `$r` should contain hooks property when it is `forwardRef` or `memo` component ([meowtec](https://github.com/meowtec) in [facebook#20626](facebook#20626)) * Ensure `sync-xhr` is allowed before reload and profile ([ChrisDobby](https://github.com/ChrisDobby) in [facebook#20879](facebook#20879)) * Bump electron version from 9.1.0 to 11.1.0 for darwin-arm64 builds ([jaiwanth-v](https://github.com/jaiwanth-v) in [facebook#20496](facebook#20496)) * Fixed primitive hook badge colors for light theme ([bvaughn](https://github.com/bvaughn) in [facebook#21034](facebook#21034)) * Increased minimum Chrome/Firefox versions from 51/54 to 60/55 to reduce polyfill code. ([bvaughn](https://github.com/bvaughn) in [facebook#21185](facebook#21185)) * Fix can't expand prop value in some scenario ([iChenLei](https://github.com/iChenLei) in [facebook#20534](facebook#20534)) * Flush updated passive warning/error info after delay ([bvaughn](https://github.com/bvaughn) in [facebook#20931](facebook#20931)) * Patch console methods even when only show-inline-warnings/errors enabled ([bvaughn](https://github.com/bvaughn) in [facebook#20688](facebook#20688)) * React Native fixes for new inline errors feature ([bvaughn](https://github.com/bvaughn) in [facebook#20502](facebook#20502)) * Fixed invalid work tag constants that affected a certain range of React versions ([bvaughn](https://github.com/bvaughn) in [facebook#20362](facebook#20362)) #### Features * Improve Profiler commit-selector UX ([bvaughn](https://github.com/bvaughn) in [facebook#20943](facebook#20943)) * Swap `log` with `cbrt` for commit bar height ([bvaughn](https://github.com/bvaughn) in [facebook#20952](facebook#20952)) * Integrate with new experimental React Suspense features to improve props loading and inspection UX ([bvaughn](https://github.com/bvaughn) in [facebook#20548](facebook#20548), [facebook#20789](facebook#20789), [facebook#20458](facebook#20458)) * Expose DEV-mode warnings in devtools UI ([eps1lon](https://github.com/eps1lon) in [facebook#20463](facebook#20463)) * Display shortcuts for prev/next search result ([eps1lon](https://github.com/eps1lon) in [facebook#20470](facebook#20470)) * Increase the clickable area of the prop value ([TryingToImprove](https://github.com/TryingToImprove) in [facebook#20428](facebook#20428)) #### Experimental features The following features are only enabled when used with (experimental) builds of React: * Shows which fibers scheduled the current update ([bvaughn](https://github.com/bvaughn) in [facebook#21171](facebook#21171)) * Add commit and post-commit durations to Profiler UI ([bvaughn](https://github.com/bvaughn) in [facebook#20984](facebook#20984), [facebook#21183](facebook#21183)) * Show which hooks (indices) changed when profiling ([bvaughn](https://github.com/bvaughn) in [facebook#20998](facebook#20998)) ###### Improve Profiler commit-selector UX ![Video demonstrating tooltip with commit duration and time](https://user-images.githubusercontent.com/29597/110225725-30a1f480-7eb6-11eb-9825-4c762ffde0bb.gif) ![Graphic illustrating Profiler bar heights using different scales](https://user-images.githubusercontent.com/29597/110361997-bafd6c00-800e-11eb-92d8-d411e6c79d84.png) ###### Expose DEV-mode warnings in devtools UI ![Inline warnings and errors](https://user-images.githubusercontent.com/29597/114225729-adeed800-9940-11eb-8df2-34d8b0ead3b8.png) ###### Shows which fibers scheduled the current update ![Shows which fibers scheduled the current update](https://user-images.githubusercontent.com/29597/114225931-eee6ec80-9940-11eb-90cc-fe6630fbfc08.gif) ###### Add commit and post-commit durations to Profiler UI ![Add commit and post-commit durations to Profiler UI](https://user-images.githubusercontent.com/29597/114225991-00c88f80-9941-11eb-84df-e2af04ecef1c.gif) ###### Show which hooks (indices) changed when profiling ![Show which hooks (indices) changed when profiling](https://user-images.githubusercontent.com/29597/114225838-d37be180-9940-11eb-93f8-93e0115421c8.png) --- ### 4.10.4 May 20, 2021 #### Bugfix * Ported passive effects sync flushing/bubbling bugfix ([bvaughn](https://github.com/bvaughn) in [facebook#21540](facebook#21540)) --- ### 4.10.3 April 27, 2021 #### Bugfix * Replaced Facebook-internal fburl.com link with public fb.me link for Bridge protocol mismatch info page ([bvaughn](https://github.com/bvaughn) in [facebook#21344](facebook#21344)) --- ### 4.10.2 April 27, 2021 #### Features * Added Bridge protocol check and warning dialog if embedded DevTools backend is incompatible with DevTools UI ([bvaughn](https://github.com/bvaughn) in [facebook#21344](facebook#21344)) --- ### 4.10.1 November 12, 2020 #### Bugfix * Fixed invalid internal work tag mappings ([bvaughn](https://github.com/bvaughn) in [facebook#20362](facebook#20362)) --- ### 4.10.0 November 12, 2020 #### Features * Make DevTools Websocket retry delay configurable ([bvaughn](https://github.com/bvaughn) in [facebook#20107](facebook#20107)) #### Bugfix * Fix error loading source maps for devtools extension ([sytranvn](https://github.com/sytranvn) in [facebook#20079](facebook#20079)) * Remove css-sourcemap for `react-devtools-inline` ([sean9keenan](https://github.com/sean9keenan) in [facebook#20170](facebook#20170)) * Decrease NPM update notification/prompt for standalone DevTools ([recurx](https://github.com/recurx) in [facebook#20078](facebook#20078)) --- ### 4.9.0 October 19, 2020 #### Features * [Improved DevTools editing interface](#improved-devtools-editing-interface) ([bvaughn](https://github.com/bvaughn) in [facebook#19774](facebook#19774)) * Add ⎇ + arrow key navigation ([bvaughn](https://github.com/bvaughn) in [facebook#19741](facebook#19741)) * Add checkbox toggle for boolean values ([mdaj06](https://github.com/mdaj06) in [facebook#19714](facebook#19714)) * Show symbols used as keys in state ([omarsy](https://github.com/omarsy) in [facebook#19786](facebook#19786)) * Add new (unstable) `SuspenseList` component type ([bpernick](https://github.com/bpernick) in [facebook#19684](facebook#19684)) #### Bugfix * Show proper icon/tooltip for restricted browser pages ([sktguha](https://github.com/sktguha) in [facebook#20023](facebook#20023)) * Fix emoji character shown in Chrome developer tools panel ([bvaughn](https://github.com/bvaughn) in [facebook#19603](facebook#19603)) * Don't open two tabs in Firefox when clicking on troubleshooting instructions ([unbyte](https://github.com/unbyte) in [facebook#19632](facebook#19632)) * Support inner component `_debugOwner` in memo ([bvaughn](https://github.com/bvaughn) in [facebook#19556](facebook#19556)) * Proxied methods should be safely dehydrated for display ([@pfongkye](https://github.com/pfongkye) in [b6e1d08](facebook@b6e1d08) * Property list values should show whitespace ([sammarks](https://github.com/sammarks) in [facebook#19640](facebook#19640)) * Fix crash when inspecting document.all ([omarsy](https://github.com/omarsy) in [facebook#19619](facebook#19619)) * Don't call generators during inspection since they may be stateful ([todortotev](https://github.com/todortotev) in [facebook#19831](facebook#19831)) * Fix bad null check in DevTools highlight code ([bvaughn](https://github.com/bvaughn) in [facebook#20010](facebook#20010)) * Handled a missing suspense fiber when suspense is filtered on the profiler ([IDrissAitHafid](https://github.com/IDrissAitHafid) in [#ISSUE](https://github.com/facebook/react/pull/ISSUE)) * Fixed unfound node error when Suspense is filtered ([IDrissAitHafid](https://github.com/IDrissAitHafid) in [facebook#20019](facebook#20019)) * Always overrides the dispatcher when shallow rendering ([bvaughn](https://github.com/bvaughn) in [facebook#20011](facebook#20011)) * Frevent phishing attacks ([iamwilson](https://github.com/iamwilson) in [facebook#19934](facebook#19934)) --- ### Other * Enable source maps for DevTools production builds ([jpribyl ](https://github.com/jpribyl ) in [facebook#19773](facebook#19773)) * Drop support for IE 11 ([bvaughn](https://github.com/bvaughn) in [facebook#19875](facebook#19875)) * Remove ReactJS.org version check "cheat" ([sktguha](https://github.com/sktguha) in [facebook#19939](facebook#19939)) * Update outdated links and fix two broken links ([sktguha](https://github.com/sktguha) in [facebook#19985](facebook#19985)) * Remove support for deprecated/unreleased React Flare event system ([trueadm](https://github.com/trueadm) in [facebook#19520](facebook#19520)) ###### Improved DevTools editing interface **Improved parsing** Value parsing logic has been relaxed so as to no longer require quotes around strings or double quotes: ![looser parsing logic](https://user-images.githubusercontent.com/29597/93407442-36504300-f860-11ea-90e8-5ad54c9b8b34.gif) **Modifying arrays** New values can be added to array props/state/hooks now. Existing values can also be deleted: ![adding and removing values from an array](https://user-images.githubusercontent.com/29597/93407457-3ea87e00-f860-11ea-8b85-a41904e6c25f.gif) **Modifying objects** New keys can be added to object props/state/hooks now. Existing keys can be renamed or deleted entirely: ![adding/renaming/removing object properties](https://user-images.githubusercontent.com/29597/93407464-449e5f00-f860-11ea-909b-49dafb56f6c5.gif) --- ### 4.8.2 July 15, 2020 #### Bugfix * Fix broken `Suspense` heuristic ([bvaughn](https://github.com/bvaughn) in [facebook#19373](facebook#19373)) * Fixed error with standalone in HTTPS mode ([b-ponomarenko](https://github.com/b-ponomarenko) in [facebook#19336](facebook#19336)) * Disable DevTools minification ([bvaughn](https://github.com/bvaughn) in [facebook#19369](facebook#19369)) --- ### 4.8.1 July 10, 2020 #### Bugfix * Fix break-on-warning to truly be off by default. ([gaearon](https://github.com/gaearon) in [facebook#19309](facebook#19309)) --- ### 4.8.0 July 9, 2020 #### Features * Add SSL support to React devtools standalone ([ittaibaratz](https://github.com/ittaibaratz) in [facebook#19191](facebook#19191)) * New break-on-warning feature (off by default) ([bvaughn](https://github.com/bvaughn) in [facebook#19048](facebook#19048)) #### Bugfix * Updates Electron version for react-devtools to pull in several security fixes ([gsimone](https://github.com/gsimone) in [facebook#19280](facebook#19280)) * Remove unnecessary tag end from CommitRanked view ([finico](https://github.com/finico) in [facebook#19195](facebook#19195)) * Shutdown DevTools Bridge synchronously when unmounting ([bvaughn](https://github.com/bvaughn) in [facebook#19180](facebook#19180)) --- ### 4.7.0 May 18, 2020 #### Features * Improved appended component stacks for third party warnings to be more like native ([bvaughn](https://github.com/bvaughn) in [facebook#18656](facebook#18656)) * Improve inline search results by highlighting match on HOC badge ([bl00mber](https://github.com/bl00mber) in [facebook#18802](facebook#18802)) * Add key badge to inspected element in right hand pane ([karlhorky]](https://github.com/karlhorky) in [facebook#18737](facebook#18737)) * Improve Profiler snapshot selector drag-and-drop UX ([bl00mber](https://github.com/bl00mber) in [facebook#18852](facebook#18852)) * Profiler tooltip now includes self duration to make it easier to scan times without requiring selection ([bvaughn](https://github.com/bvaughn) in [facebook#18510](facebook#18510)) * Rendered by list also now highlights native elements on hover ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#18479](facebook#18479)) * Add in-page highlighting for mouse-over interactions in Profiler ([bl00mber](https://github.com/bl00mber) in [facebook#18745](facebook#18745)) #### Bugfix * Fix Profiler bug "_Could not find commit data for root_" by resetting selected node on root change ([bl00mber](https://github.com/bl00mber) in [facebook#18880](facebook#18880)) * Add `imported` flag to Profiling data to more reliably differentiate between imported and session data ([bl00mber](https://github.com/bl00mber) in [facebook#18913](facebook#18913)) * Disable Profiler filtering to avoid edge case runtime error "_Cannot read property 'duration' of undefined_" ([bvaughn](https://github.com/bvaughn) in [facebook#18862](facebook#18862)) * Fix Profiler bug "_cannot read property 'memoizedState' of null_" ([bvaughn](https://github.com/bvaughn) in [facebook#18522](facebook#18522)) * Whitespace search results highlighting bug fix ([bvaughn](https://github.com/bvaughn) in [facebook#18527](facebook#18527)) * Improved confusing Profiler tooltip text for components that did not render ([bvaughn](https://github.com/bvaughn) in [facebook#18523](facebook#18523)) * Fix edge case performance issue when highlight elements enabled ([Faelivrinx](https://github.com/Faelivrinx) in [facebook#18498](facebook#18498)) * Disabled Webpack auto polyfill for `setImmediate` ([bvaughn](https://github.com/bvaughn) in [facebook#18860](facebook#18860)) * Fix mouse interactions for standalone DevTools on Linux ([bl00mber](https://github.com/bl00mber) in [facebook#18772](facebook#18772)) --- ### 4.6.0 March 26, 2020 #### Features * Add shortcut keys for tab switching ([kerolloz](https://github.com/kerolloz) in [facebook#18248](facebook#18248)) #### Bugfix * Improve display of complex values for `useDebugValue` ([eps1lon](https://github.com/eps1lon) in [facebook#18070](facebook#18070)) * Fix minor CSS layout issue that broke Profiler commit selector UI ([bvaughn](https://github.com/bvaughn) in [facebook#18286](facebook#18286)) * Inlined DevTools event emitter implementation to fix a source of Profiler bugs ([bvaughn](https://github.com/bvaughn) in [facebook#18378](facebook#18378)) #### Cleanup * Remove "es6-symbol" dependency from "react-devtools-inline" package ([bvaughn](https://github.com/bvaughn) in [facebook#18397](facebook#18397)) --- ### 4.5.0 March 3, 2020 #### Features * Improve function props display for inspected elements ([bvaughn](https://github.com/bvaughn) in [facebook#17789](facebook#17789)) * Re-enabled context menu for Firefox extension ([bvaughn](https://github.com/bvaughn) in [facebook#17838](facebook#17838)) * Apply changes to props/state/hooks on blur (rather than on ENTER) ([muratcatal](https://github.com/muratcatal) in [facebook#17062](facebook#17062)) * Add info tooltip to nodes in Profiler ([M-Izadmehr](https://github.com/M-Izadmehr) in [facebook#18048](facebook#18048)) * Added resize support to Components panel ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#18046](facebook#18046)) #### Bugfix * Improve how empty commits are filtered ([nutboltu](https://github.com/nutboltu) in [facebook#17931](facebook#17931)) * BigInt serialize issue in devtools copy to clipboard ([bvaughn](https://github.com/bvaughn) in [facebook#17771](facebook#17771)) * Renamed "backend.js" to "react_devtools_backend.js" to reduce potential confusion from profiling ([bvaughn](https://github.com/bvaughn) in [facebook#17790](facebook#17790)) * Update root styles to prevent `box-sizing` style from leaking outside of inline target ([GasimGasimzada](https://github.com/GasimGasimzada) in [facebook#17775](facebook#17775)) * Fix "_Cannot read property 'sub' of undefined_" error when navigating to plain-text pages ([wfnuser](https://github.com/wfnuser) in [facebook#17848](facebook#17848)) * Fix potential error with composite hooks during shallow re-rendering ([bvaughn](https://github.com/bvaughn) in [facebook#18130](facebook#18130)) * Scope dev tools wildcard styles within DevTools CSS class ([@GasimGasimzada](https://github.com/GasimGasimzada) in [9cc094a](facebook@9cc094a#diff-ab5ee5655b2aac3260e1f836546a13c9)) ###### Info summary tooltips ![Profiler tooltips in Flamegraph chart](https://user-images.githubusercontent.com/28848972/74614074-09468100-5115-11ea-8c87-c224d229ef15.gif) ![Profiler tooltips in Ranked chart](https://user-images.githubusercontent.com/28848972/74614072-08155400-5115-11ea-8d19-7ab3d27b9b0a.gif) ###### Components panel resize ![Horizontal Components panel resizing](https://user-images.githubusercontent.com/23095052/74603147-ca7edf80-50b0-11ea-887f-db7ada855c50.gif) ![Vertical Components panel resizing](https://user-images.githubusercontent.com/23095052/74603149-d074c080-50b0-11ea-820f-63db30b4c285.gif) --- ### 4.4.0 January 3, 2020 #### Features * Re-enabled "copy" prop/state/hooks context menu option for Firefox ([bvaughn](https://github.com/bvaughn),[rpl](https://github.com/rpl) in [facebook#17740](facebook#17740)) * Shift+Enter focuses previous search result in Components tree ([Bo-Duke](https://github.com/Bo-Duke) in [facebook#17005](facebook#17005)) * Properly display formatted `RegExp` values in props/state panel([bvaughn](https://github.com/bvaughn) in [facebook#17690](facebook#17690)) * Profiler commit selector wraps around for easier navigation of large profiles ([bvaughn](https://github.com/bvaughn) in [facebook#17760](facebook#17760)) #### Bugfix * Check `document.contentType` before injecting hook to avoid breaking XML file syntax highlighting in Firefox ([bvaughn](https://github.com/bvaughn) in [facebook#17739](facebook#17739)) * Fix standalone UI not responding to mouse interactions due to `webkit-app-region` style ([cwatson88](https://github.com/cwatson88) in [facebook#17584](facebook#17584)) * Support inspecting object values with null protos ([bvaughn](https://github.com/bvaughn) in [facebook#17757](facebook#17757)) * Support inspecting values that have overridden `hasOwnProperty` attribute ([bvaughn](https://github.com/bvaughn) in [facebook#17768](facebook#17768)) * Fixed regression that made Profiler "Could not find node…" error happen more frequently ([bvaughn](https://github.com/bvaughn) in [facebook#17759](facebook#17759)) --- ### 4.3.0 December 20, 2019 #### Features * Show component location for selected element in bottom/right panel ([bvaughn](https://github.com/bvaughn) in [facebook#17567](facebook#17567)) * Improved inspected element values with inline previews ([bvaughn](https://github.com/bvaughn) in [facebook#17579](facebook#17579)) * Improved selection and toggling for inspected element panel ([bvaughn](https://github.com/bvaughn) in [facebook#17588](facebook#17588)) * Copy context menu for inspecting and copying props/state/hooks/context values ([bvaughn](https://github.com/bvaughn) in [facebook#17608](facebook#17608)) #### Bug fixes * Fix serialization for `BigInt` type so that it does not break inspection panel. ([nutboltu](https://github.com/nutboltu) in [facebook#17233](facebook#17233)) * Fix display name logic for `forwardRef`s that use `displayName` property ([zthxxx](https://github.com/zthxxx) in [facebook#17613](facebook#17613)) --- ### 4.2.1 November 27, 2019 #### Bug fixes * Profiler automatically filters certain types of empty (no work) commits. ([bvaughn](https://github.com/bvaughn) in [facebook#17253](facebook#17253)) * Fix memoized components showing as "Anonymous" in Components tab. ([wsmd](https://github.com/wsmd) in [facebook#17274](facebook#17274)) * Edge-case bugfix for non-string element keys. ([bvaughn](https://github.com/bvaughn) in [facebook#17164](facebook#17164)) --- ### 4.2.0 October 3, 2019 #### Features * "Highlight updates" feature added for browser extensions and `react-devtools-inline` NPM package. ([bvaughn](https://github.com/bvaughn) in [facebook#16989](facebook#16989)) --- ### 4.1.3 September 30, 2019 #### Bug fixes * Fixed regression where DevTools wouldn't properly connect with apps when using the `file://` protocol. ([linshunghuang](https://github.com/linshunghuang) in [facebook#16953](facebook#16953)) --- ### 4.1.2 September 27, 2019 #### Bug fixes * Fixed an infinite loop that occurred in some cases with prop values of `NaN`. ([bvaughn](https://github.com/bvaughn) in [facebook#16934](facebook#16934)) --- ### 4.1.1 September 26, 2019 #### Bug fixes * Fixed bug where Components panel was always empty for certain users. ([linshunghuang](https://github.com/linshunghuang) in [facebook#16900](facebook#16900)) * Fixed regression in DevTools editable hooks interface that caused primitive values to be shown as `undefined`. ([bvaughn](https://github.com/bvaughn) in [facebook#16867](facebook#16867)) * Fixed bug where DevTools showed stale values in props/state/hooks editing interface. ([bvaughn](https://github.com/bvaughn) in [facebook#16878](facebook#16878)) * Show unsupported version dialog with downgrade instructions. ([bvaughn](https://github.com/bvaughn) in [facebook#16897](facebook#16897)) --- ### 4.1.0 September 19, 2019 #### Features * Props/state editor supports adding new values and changing value types. ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#16700](facebook#16700)) #### Bug fixes * Profiler correctly saves/exports profiling data in Firefox now. ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#16612](facebook#16612)) * Class components now show "legacy context" header (rather than "context") for legacy API. ([hristo-kanchev](https://github.com/hristo-kanchev) in [facebook#16617](facebook#16617)) * Show component source button ("<>") now highlights the `render` method for class components. ([theKashey](https://github.com/theKashey) in [facebook#16759](facebook#16759)) * Bugfix for components with non-standard object values for `function.name`. ([LetItRock](https://github.com/LetItRock) in [facebook#16798](facebook#16798)) --- ### 4.0.6 August 26, 2019 #### Bug fixes * Remove ⚛️ emoji prefix from Firefox extension tab labels * Standalone polyfills `Symbol` usage --- ### 4.0.5 August 19, 2019 #### Bug fixes * Props, state, and context values are alpha sorted. * Standalone DevTools properly serves backend script over localhost:8097 --- ### 4.0.4 August 18, 2019 #### Bug fixes * Bugfix for potential error if a min-duration commit filter is applied after selecting a fiber in the Profiler UI. --- ### 4.0.3 August 17, 2019 #### Bug fixes * ES6 `Map` and `Set`, typed arrays, and other unserializable types (e.g. Immutable JS) can now be inspected. * Empty objects and arrays now display an "(empty)" label to the right to reduce confusion. * Components that use only the `useContext` hook now properly display hooks values in side panel. * Style editor now supports single quotes around string values (e.g. both `"red"` and `'red'`). * Fixed edge case bug that prevented profiling when both React v16 and v15 were present on a page. --- ### 4.0.2 August 15, 2019 #### Permissions cleanup * Removed unnecessary `webNavigation ` permission from Chrome and Firefox extensions. --- ### 4.0.1 August 15, 2019 #### Permissions cleanup * Removed unnecessary `<all_urls>`, `background`, and `tabs` permissions from Chrome and Firefox extensions. --- ### 4.0.0 August 15, 2019 --- ### General changes #### Improved performance The legacy DevTools extension used to add significant performance overhead, making it unusable for some larger React applications. That overhead has been effectively eliminated in version 4. [Learn more](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md) about the performance optimizations that made this possible. #### Component stacks React component authors have often requested a way to log warnings that include the React ["component stack"](https://reactjs.org/docs/error-boundaries.html#component-stack-traces). DevTools now provides an option to automatically append this information to warnings (`console.warn`) and errors (`console.error`). ![Example console warning with component stack added](https://user-images.githubusercontent.com/29597/62228120-eec3da80-b371-11e9-81bb-018c1e577389.png) It can be disabled in the general settings panel: ![Settings panel showing "component stacks" option](https://user-images.githubusercontent.com/29597/62227882-8f65ca80-b371-11e9-8a4e-5d27011ad1aa.png) --- ### Components tree changes #### Component filters Large component trees can sometimes be hard to navigate. DevTools now provides a way to filter components so that you can hide ones you're not interested in seeing. ![Component filter demo video](https://user-images.githubusercontent.com/29597/62229209-0bf9a880-b374-11e9-8f84-cebd6c1a016b.gif) Host nodes (e.g. HTML `<div>`, React Native `View`) are now hidden by default, but you can see them by disabling that filter. Filter preferences are remembered between sessions. #### No more inline props Components in the tree no longer show inline props. This was done to [make DevTools faster](https://github.com/facebook/react/blob/main/packages/react-devtools/OVERVIEW.md) and to make it easier to browse larger component trees. You can view a component's props, state, and hooks by selecting it: ![Inspecting props](https://user-images.githubusercontent.c…
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)) | devDependencies | major | [`18.3.18` -> `19.0.7`](https://renovatebot.com/diffs/npm/@types%2freact/18.3.18/19.0.7) | | [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-dom) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom)) | devDependencies | major | [`18.3.5` -> `19.0.3`](https://renovatebot.com/diffs/npm/@types%2freact-dom/18.3.5/19.0.3) | | [react](https://react.dev/) ([source](https://github.com/facebook/react/tree/HEAD/packages/react)) | dependencies | major | [`18.3.1` -> `19.0.0`](https://renovatebot.com/diffs/npm/react/18.3.1/19.0.0) | | [react-dom](https://react.dev/) ([source](https://github.com/facebook/react/tree/HEAD/packages/react-dom)) | dependencies | major | [`18.3.1` -> `19.0.0`](https://renovatebot.com/diffs/npm/react-dom/18.3.1/19.0.0) | --- ### Release Notes <details> <summary>facebook/react (react)</summary> ### [`v19.0.0`](https://github.com/facebook/react/blob/HEAD/CHANGELOG.md#1900-December-5-2024) [Compare Source](https://github.com/facebook/react/compare/v18.3.1...v19.0.0) Below is a list of all new features, APIs, deprecations, and breaking changes. Read [React 19 release post](https://react.dev/blog/2024/04/25/react-19) and [React 19 upgrade guide](https://react.dev/blog/2024/04/25/react-19-upgrade-guide) for more information. > Note: To help make the upgrade to React 19 easier, we’ve published a [email protected] release that is identical to 18.2 but adds warnings for deprecated APIs and other changes that are needed for React 19. We recommend upgrading to React 18.3.1 first to help identify any issues before upgrading to React 19. ##### New Features ##### React - Actions: `startTransition` can now accept async functions. Functions passed to `startTransition` are called “Actions”. A given Transition can include one or more Actions which update state in the background and update the UI with one commit. In addition to updating state, Actions can now perform side effects including async requests, and the Action will wait for the work to finish before finishing the Transition. This feature allows Transitions to include side effects like `fetch()` in the pending state, and provides support for error handling, and optimistic updates. - `useActionState`: is a new hook to order Actions inside of a Transition with access to the state of the action, and the pending state. It accepts a reducer that can call Actions, and the initial state used for first render. It also accepts an optional string that is used if the action is passed to a form `action` prop to support progressive enhancement in forms. - `useOptimistic`: is a new hook to update state while a Transition is in progress. It returns the state, and a set function that can be called inside a transition to “optimistically” update the state to expected final value immediately while the Transition completes in the background. When the transition finishes, the state is updated to the new value. - `use`: is a new API that allows reading resources in render. In React 19, `use` accepts a promise or Context. If provided a promise, `use` will suspend until a value is resolved. `use` can only be used in render but can be called conditionally. - `ref` as a prop: Refs can now be used as props, removing the need for `forwardRef`. - **Suspense sibling pre-warming**: When a component suspends, React will immediately commit the fallback of the nearest Suspense boundary, without waiting for the entire sibling tree to render. After the fallback commits, React will schedule another render for the suspended siblings to “pre-warm” lazy requests. ##### React DOM Client - `<form> action` prop: Form Actions allow you to manage forms automatically and integrate with `useFormStatus`. When a `<form> action` succeeds, React will automatically reset the form for uncontrolled components. The form can be reset manually with the new `requestFormReset` API. - `<button> and <input> formAction` prop: Actions can be passed to the `formAction` prop to configure form submission behavior. This allows using different Actions depending on the input. - `useFormStatus`: is a new hook that provides the status of the parent `<form> action`, as if the form was a Context provider. The hook returns the values: `pending`, `data`, `method`, and `action`. - Support for Document Metadata: We’ve added support for rendering document metadata tags in components natively. React will automatically hoist them into the `<head>` section of the document. - Support for Stylesheets: React 19 will ensure stylesheets are inserted into the `<head>` on the client before revealing the content of a Suspense boundary that depends on that stylesheet. - Support for async scripts: Async scripts can be rendered anywhere in the component tree and React will handle ordering and deduplication. - Support for preloading resources: React 19 ships with `preinit`, `preload`, `prefetchDNS`, and `preconnect` APIs to optimize initial page loads by moving discovery of additional resources like fonts out of stylesheet loading. They can also be used to prefetch resources used by an anticipated navigation. ##### React DOM Server - Added `prerender` and `prerenderToNodeStream` APIs for static site generation. They are designed to work with streaming environments like Node.js Streams and Web Streams. Unlike `renderToString`, they wait for data to load for HTML generation. ##### React Server Components - RSC features such as directives, server components, and server functions are now stable. This means libraries that ship with Server Components can now target React 19 as a peer dependency with a react-server export condition for use in frameworks that support the Full-stack React Architecture. The underlying APIs used to implement a React Server Components bundler or framework do not follow semver and may break between minors in React 19.x. See [docs](https://19.react.dev/reference/rsc/server-components) for how to support React Server Components. ##### Deprecations - Deprecated: `element.ref` access: React 19 supports ref as a prop, so we’re deprecating `element.ref` in favor of `element.props.ref`. Accessing will result in a warning. - `react-test-renderer`: In React 19, react-test-renderer logs a deprecation warning and has switched to concurrent rendering for web usage. We recommend migrating your tests to [@​testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@​testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro) ##### Breaking Changes React 19 brings in a number of breaking changes, including the removals of long-deprecated APIs. We recommend first upgrading to `18.3.1`, where we've added additional deprecation warnings. Check out the [upgrade guide](https://19.react.dev/blog/2024/04/25/react-19-upgrade-guide) for more details and guidance on codemodding. ##### React - New JSX Transform is now required: We introduced [a new JSX transform](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) in 2020 to improve bundle size and use JSX without importing React. In React 19, we’re adding additional improvements like using ref as a prop and JSX speed improvements that require the new transform. - Errors in render are not re-thrown: Errors that are not caught by an Error Boundary are now reported to window.reportError. Errors that are caught by an Error Boundary are reported to console.error. We’ve introduced `onUncaughtError` and `onCaughtError` methods to `createRoot` and `hydrateRoot` to customize this error handling. - Removed: `propTypes`: Using `propTypes` will now be silently ignored. If required, we recommend migrating to TypeScript or another type-checking solution. - Removed: `defaultProps` for functions: ES6 default parameters can be used in place. Class components continue to support `defaultProps` since there is no ES6 alternative. - Removed: `contextTypes` and `getChildContext`: Legacy Context for class components has been removed in favor of the `contextType` API. - Removed: string refs: Any usage of string refs need to be migrated to ref callbacks. - Removed: Module pattern factories: A rarely used pattern that can be migrated to regular functions. - Removed: `React.createFactory`: Now that JSX is broadly supported, all `createFactory` usage can be migrated to JSX components. - Removed: `react-test-renderer/shallow`: This has been a re-export of [react-shallow-renderer](https://github.com/enzymejs/react-shallow-renderer) since React 18. If needed, you can continue to use the third-party package directly. We recommend using [@​testing-library/react](https://testing-library.com/docs/react-testing-library/intro/) or [@​testing-library/react-native](https://testing-library.com/docs/react-native-testing-library/intro) instead. ##### React DOM - Removed: `react-dom/test-utils`: We’ve moved `act` from `react-dom/test-utils` to react. All other utilities have been removed. - Removed: `ReactDOM`.`render`, `ReactDOM`.`hydrate`: These have been removed in favor of the concurrent equivalents: `ReactDOM`.`createRoot` and `ReactDOM.hydrateRoot`. - Removed: `unmountComponentAtNode`: Removed in favor of `root.unmount()`. - Removed: `ReactDOM`.`findDOMNode`: You can replace `ReactDOM`.`findDOMNode` with DOM Refs. ##### Notable Changes ##### React - `<Context>` as a provider: You can now render `<Context>` as a provider instead of `<Context.Provider>`. - Cleanup functions for refs: When the component unmounts, React will call the cleanup function returned from the ref callback. - `useDeferredValue` initial value argument: When provided, `useDeferredValue` will return the initial value for the initial render of a component, then schedule a re-render in the background with the `deferredValue` returned. - Support for Custom Elements: React 19 now passes all tests on [Custom Elements Everywhere](https://custom-elements-everywhere.com/). - StrictMode changes: `useMemo` and `useCallback` will now reuse the memoized results from the first render, during the second render. Additionally, StrictMode will now double-invoke ref callback functions on initial mount. - UMD builds removed: To load React 19 with a script tag, we recommend using an ESM-based CDN such as [esm.sh](http://esm.sh). ##### React DOM - Diffs for hydration errors: In the case of a mismatch, React 19 logs a single error with a diff of the mismatched content. - Compatibility with third-party scripts and extensions: React will now force a client re-render to fix up any mismatched content caused by elements inserted by third-party JS. ##### TypeScript Changes The most common changes can be codemodded with `npx types-react-codemod@latest preset-19 ./path-to-your-react-ts-files`. - Removed deprecated TypeScript types: - `ReactChild` (replacement: `React.ReactElement | number | string)` - `ReactFragment` (replacement: `Iterable<React.ReactNode>`) - `ReactNodeArray` (replacement: `ReadonlyArray<React.ReactNode>`) - `ReactText` (replacement: `number | string`) - `VoidFunctionComponent` (replacement: `FunctionComponent`) - `VFC` (replacement: `FC`) - Moved to `prop-types`: `Requireable`, `ValidationMap`, `Validator`, `WeakValidationMap` - Moved to `create-react-class`: `ClassicComponentClass`, `ClassicComponent`, `ClassicElement`, `ComponentSpec`, `Mixin`, `ReactChildren`, `ReactHTML`, `ReactSVG`, `SFCFactory` - Disallow implicit return in refs: refs can now accept cleanup functions. When you return something else, we can’t tell if you intentionally returned something not meant to clean up or returned the wrong value. Implicit returns of anything but functions will now error. - Require initial argument to `useRef`: The initial argument is now required to match `useState`, `createContext` etc - Refs are mutable by default: Ref objects returned from `useRef()` are now always mutable instead of sometimes being immutable. This feature was too confusing for users and conflicted with legit cases where refs were managed by React and manually written to. - Strict `ReactElement` typing: The props of React elements now default to `unknown` instead of `any` if the element is typed as `ReactElement` - JSX namespace in TypeScript: The global `JSX` namespace is removed to improve interoperability with other libraries using JSX. Instead, the JSX namespace is available from the React package: `import { JSX } from 'react'` - Better `useReducer` typings: Most `useReducer` usage should not require explicit type arguments.\ For example, ```diff -useReducer<React.Reducer<State, Action>>(reducer) +useReducer(reducer) ``` or ```diff -useReducer<React.Reducer<State, Action>>(reducer) +useReducer<State, Action>(reducer) ``` ##### All Changes ##### React - Add support for async Actions ([#​26621](https://github.com/facebook/react/pull/26621), [#​26726](https://github.com/facebook/react/pull/26726), [#​28078](https://github.com/facebook/react/pull/28078), [#​28097](https://github.com/facebook/react/pull/28097), [#​29226](https://github.com/facebook/react/pull/29226), [#​29618](https://github.com/facebook/react/pull/29618), [#​29670](https://github.com/facebook/react/pull/29670), [#​26716](https://github.com/facebook/react/pull/26716) by [@​acdlite](https://github.com/acdlite) and [@​sebmarkbage](https://github.com/sebmarkbage)) - Add `useActionState()` hook to update state based on the result of a Form Action ([#​27270](https://github.com/facebook/react/pull/27270), [#​27278](https://github.com/facebook/react/pull/27278), [#​27309](https://github.com/facebook/react/pull/27309), [#​27302](https://github.com/facebook/react/pull/27302), [#​27307](https://github.com/facebook/react/pull/27307), [#​27366](https://github.com/facebook/react/pull/27366), [#​27370](https://github.com/facebook/react/pull/27370), [#​27321](https://github.com/facebook/react/pull/27321), [#​27374](https://github.com/facebook/react/pull/27374), [#​27372](https://github.com/facebook/react/pull/27372), [#​27397](https://github.com/facebook/react/pull/27397), [#​27399](https://github.com/facebook/react/pull/27399), [#​27460](https://github.com/facebook/react/pull/27460), [#​28557](https://github.com/facebook/react/pull/28557), [#​27570](https://github.com/facebook/react/pull/27570), [#​27571](https://github.com/facebook/react/pull/27571), [#​28631](https://github.com/facebook/react/pull/28631), [#​28788](https://github.com/facebook/react/pull/28788), [#​29694](https://github.com/facebook/react/pull/29694), [#​29695](https://github.com/facebook/react/pull/29695), [#​29694](https://github.com/facebook/react/pull/29694), [#​29665](https://github.com/facebook/react/pull/29665), [#​28232](https://github.com/facebook/react/pull/28232), [#​28319](https://github.com/facebook/react/pull/28319) by [@​acdlite](https://github.com/acdlite), [@​eps1lon](https://github.com/eps1lon), and [@​rickhanlonii](https://github.com/rickhanlonii)) - Add `use()` API to read resources in render ([#​25084](https://github.com/facebook/react/pull/25084), [#​25202](https://github.com/facebook/react/pull/25202), [#​25207](https://github.com/facebook/react/pull/25207), [#​25214](https://github.com/facebook/react/pull/25214), [#​25226](https://github.com/facebook/react/pull/25226), [#​25247](https://github.com/facebook/react/pull/25247), [#​25539](https://github.com/facebook/react/pull/25539), [#​25538](https://github.com/facebook/react/pull/25538), [#​25537](https://github.com/facebook/react/pull/25537), [#​25543](https://github.com/facebook/react/pull/25543), [#​25561](https://github.com/facebook/react/pull/25561), [#​25620](https://github.com/facebook/react/pull/25620), [#​25615](https://github.com/facebook/react/pull/25615), [#​25922](https://github.com/facebook/react/pull/25922), [#​25641](https://github.com/facebook/react/pull/25641), [#​25634](https://github.com/facebook/react/pull/25634), [#​26232](https://github.com/facebook/react/pull/26232), [#​26536](https://github.com/facebook/react/pull/26535), [#​26739](https://github.com/facebook/react/pull/26739), [#​28233](https://github.com/facebook/react/pull/28233) by [@​acdlite](https://github.com/acdlite), [@​MofeiZ](https://github.com/mofeiZ), [@​sebmarkbage](https://github.com/sebmarkbage), [@​sophiebits](https://github.com/sophiebits), [@​eps1lon](https://github.com/eps1lon), and [@​hansottowirtz](https://github.com/hansottowirtz)) - Add `useOptimistic()` hook to display mutated state optimistically during an async mutation ([#​26740](https://github.com/facebook/react/pull/26740), [#​26772](https://github.com/facebook/react/pull/26772), [#​27277](https://github.com/facebook/react/pull/27277), [#​27453](https://github.com/facebook/react/pull/27453), [#​27454](https://github.com/facebook/react/pull/27454), [#​27936](https://github.com/facebook/react/pull/27936) by [@​acdlite](https://github.com/acdlite)) - Added an `initialValue` argument to `useDeferredValue()` hook ([#​27500](https://github.com/facebook/react/pull/27500), [#​27509](https://github.com/facebook/react/pull/27509), [#​27512](https://github.com/facebook/react/pull/27512), [#​27888](https://github.com/facebook/react/pull/27888), [#​27550](https://github.com/facebook/react/pull/27550) by [@​acdlite](https://github.com/acdlite)) - Support refs as props, warn on `element.ref` access ([#​28348](https://github.com/facebook/react/pull/28348), [#​28464](https://github.com/facebook/react/pull/28464), [#​28731](https://github.com/facebook/react/pull/28731) by [@​acdlite](https://github.com/acdlite)) - Support Custom Elements ([#​22184](https://github.com/facebook/react/pull/22184), [#​26524](https://github.com/facebook/react/pull/26524), [#​26523](https://github.com/facebook/react/pull/26523), [#​27511](https://github.com/facebook/react/pull/27511), [#​24541](https://github.com/facebook/react/pull/24541) by [@​josepharhar](https://github.com/josepharhar), [@​sebmarkbage](https://github.com/sebmarkbage), [@​gnoff](https://github.com/gnoff) and [@​eps1lon](https://github.com/eps1lon)) - Add ref cleanup function ([#​25686](https://github.com/facebook/react/pull/25686), [#​28883](https://github.com/facebook/react/pull/28883), [#​28910](https://github.com/facebook/react/pull/28910) by [@​sammy-SC](https://github.com/sammy-SC), [@​jackpope](https://github.com/jackpope), and [@​kassens](https://github.com/kassens)) - Sibling pre-rendering replaced by sibling pre-warming ([#​26380](https://github.com/facebook/react/pull/26380), [#​26549](https://github.com/facebook/react/pull/26549), [#​30761](https://github.com/facebook/react/pull/30761), [#​30800](https://github.com/facebook/react/pull/30800), [#​30762](https://github.com/facebook/react/pull/30762), [#​30879](https://github.com/facebook/react/pull/30879), [#​30934](https://github.com/facebook/react/pull/30934), [#​30952](https://github.com/facebook/react/pull/30952), [#​31056](https://github.com/facebook/react/pull/31056), [#​31452](https://github.com/facebook/react/pull/31452) by [@​sammy-SC](https://github.com/sammy-SC), [@​acdlite](https://github.com/acdlite), [@​gnoff](https://github.com/gnoff), [@​jackpope](https://github.com/jackpope), [@​rickhanlonii](https://github.com/rickhanlonii)) - Don’t rethrow errors at the root ([#​28627](https://github.com/facebook/react/pull/28627), [#​28641](https://github.com/facebook/react/pull/28641) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Batch sync discrete, continuous, and default lanes ([#​25700](https://github.com/facebook/react/pull/25700) by [@​tyao1](https://github.com/tyao1)) - Switch `<Context>` to mean `<Context.Provider>` ([#​28226](https://github.com/facebook/react/pull/28226) by [@​gaearon](https://github.com/gaearon)) - Changes to *StrictMode* - Handle `info`, `group`, and `groupCollapsed` in *StrictMode* logging ([#​25172](https://github.com/facebook/react/pull/25172) by [@​timneutkens](https://github.com/timneutkens)) - Refs are now attached/detached/attached in *StrictMode* ([#​25049](https://github.com/facebook/react/pull/25049) by [@​sammy-SC](https://github.com/sammy-SC)) - Fix `useSyncExternalStore()` hydration in *StrictMode* ([#​26791](https://github.com/facebook/react/pull/26791) by [@​sophiebits](https://github.com/sophiebits)) - Always trigger `componentWillUnmount()` in *StrictMode* ([#​26842](https://github.com/facebook/react/pull/26842) by [@​tyao1](https://github.com/tyao1)) - Restore double invoking `useState()` and `useReducer()` initializer functions in *StrictMode* ([#​28248](https://github.com/facebook/react/pull/28248) by [@​eps1lon](https://github.com/eps1lon)) - Reuse memoized result from first pass ([#​25583](https://github.com/facebook/react/pull/25583) by [@​acdlite](https://github.com/acdlite)) - Fix `useId()` in *StrictMode* ([#​25713](https://github.com/facebook/react/pull/25713) by [@​gnoff](https://github.com/gnoff)) - Add component name to *StrictMode* error messages ([#​25718](https://github.com/facebook/react/pull/25718) by [@​sammy-SC](https://github.com/sammy-SC)) - Add support for rendering BigInt ([#​24580](https://github.com/facebook/react/pull/24580) by [@​eps1lon](https://github.com/eps1lon)) - `act()` no longer checks `shouldYield` which can be inaccurate in test environments ([#​26317](https://github.com/facebook/react/pull/26317) by [@​acdlite](https://github.com/acdlite)) - Warn when keys are spread with props ([#​25697](https://github.com/facebook/react/pull/25697), [#​26080](https://github.com/facebook/react/pull/26080) by [@​sebmarkbage](https://github.com/sebmarkbage) and [@​kassens](https://github.com/kassens)) - Generate sourcemaps for production build artifacts ([#​26446](https://github.com/facebook/react/pull/26446) by [@​markerikson](https://github.com/markerikson)) - Improve stack diffing algorithm ([#​27132](https://github.com/facebook/react/pull/27132) by [@​KarimP](https://github.com/KarimP)) - Suspense throttling lowered from 500ms to 300ms ([#​26803](https://github.com/facebook/react/pull/26803) by [@​acdlite](https://github.com/acdlite)) - Lazily propagate context changes ([#​20890](https://github.com/facebook/react/pull/20890) by [@​acdlite](https://github.com/acdlite) and [@​gnoff](https://github.com/gnoff)) - Immediately rerender pinged fiber ([#​25074](https://github.com/facebook/react/pull/25074) by [@​acdlite](https://github.com/acdlite)) - Move update scheduling to microtask ([#​26512](https://github.com/facebook/react/pull/26512) by [@​acdlite](https://github.com/acdlite)) - Consistently apply throttled retries ([#​26611](https://github.com/facebook/react/pull/26611), [#​26802](https://github.com/facebook/react/pull/26802) by [@​acdlite](https://github.com/acdlite)) - Suspend Thenable/Lazy if it's used in React.Children ([#​28284](https://github.com/facebook/react/pull/28284) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Detect infinite update loops caused by render phase updates ([#​26625](https://github.com/facebook/react/pull/26625) by [@​acdlite](https://github.com/acdlite)) - Update conditional hooks warning ([#​29626](https://github.com/facebook/react/pull/29626) by [@​sophiebits](https://github.com/sophiebits)) - Update error URLs to go to new docs ([#​27240](https://github.com/facebook/react/pull/27240) by [@​rickhanlonii](https://github.com/rickhanlonii)) - Rename the `react.element` symbol to `react.transitional.element` ([#​28813](https://github.com/facebook/react/pull/28813) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Fix crash when suspending in shell during `useSyncExternalStore()` re-render ([#​27199](https://github.com/facebook/react/pull/27199) by [@​acdlite](https://github.com/acdlite)) - Fix incorrect “detected multiple renderers" error in tests ([#​22797](https://github.com/facebook/react/pull/22797) by [@​eps1lon](https://github.com/eps1lon)) - Fix bug where effect cleanup may be called twice after bailout ([#​26561](https://github.com/facebook/react/pull/26561) by [@​acdlite](https://github.com/acdlite)) - Fix suspending in shell during discrete update ([#​25495](https://github.com/facebook/react/pull/25495) by [@​acdlite](https://github.com/acdlite)) - Fix memory leak after repeated setState bailouts ([#​25309](https://github.com/facebook/react/pull/25309) by [@​acdlite](https://github.com/acdlite)) - Fix `useSyncExternalStore()` dropped update when state is dispatched in render phase ([#​25578](https://github.com/facebook/react/pull/25578) by [@​pandaiolo](https://github.com/pandaiolo)) - Fix logging when rendering a lazy fragment ([#​30372](https://github.com/facebook/react/pull/30372) by [@​tom-sherman](https://github.com/tom-sherman)) - Remove string refs ([#​25383](https://github.com/facebook/react/pull/25383), [#​28322](https://github.com/facebook/react/pull/28322) by [@​eps1lon](https://github.com/eps1lon) and [@​acdlite](https://github.com/acdlite)) - Remove Legacy Context ([#​30319](https://github.com/facebook/react/issues/30319) by [@​kassens](https://github.com/kassens)) - Remove `RefreshRuntime.findAffectedHostInstances` ([#​30538](https://github.com/facebook/react/pull/30538) by [@​gaearon](https://github.com/gaearon)) - Remove client caching from `cache()` API ([#​27977](https://github.com/facebook/react/pull/27977), [#​28250](https://github.com/facebook/react/pull/28250) by [@​acdlite](https://github.com/acdlite) and [@​gnoff](https://github.com/gnoff)) - Remove `propTypes` ([#​28324](https://github.com/facebook/react/pull/28324), [#​28326](https://github.com/facebook/react/pull/28326) by [@​gaearon](https://github.com/gaearon)) - Remove `defaultProps` support, except for classes ([#​28733](https://github.com/facebook/react/pull/28733) by [@​acdlite](https://github.com/acdlite)) - Remove UMD builds ([#​28735](https://github.com/facebook/react/pull/28735) by [@​gnoff](https://github.com/gnoff)) - Remove delay for non-transition updates ([#​26597](https://github.com/facebook/react/pull/26597) by [@​acdlite](https://github.com/acdlite)) - Remove `createFactory` ([#​27798](https://github.com/facebook/react/pull/27798) by [@​kassens](https://github.com/kassens)) ##### React DOM - Adds Form Actions to handle form submission ([#​26379](https://github.com/facebook/react/pull/26379), [#​26674](https://github.com/facebook/react/pull/26674), [#​26689](https://github.com/facebook/react/pull/26689), [#​26708](https://github.com/facebook/react/pull/26708), [#​26714](https://github.com/facebook/react/pull/26714), [#​26735](https://github.com/facebook/react/pull/26735), [#​26846](https://github.com/facebook/react/pull/26846), [#​27358](https://github.com/facebook/react/pull/27358), [#​28056](https://github.com/facebook/react/pull/28056) by [@​sebmarkbage](https://github.com/sebmarkbage), [@​acdlite](https://github.com/acdlite), and [@​jupapios](https://github.com/jupapios)) - Add `useFormStatus()` hook to provide status information of the last form submission ([#​26719](https://github.com/facebook/react/pull/26719), [#​26722](https://github.com/facebook/react/pull/26722), [#​26788](https://github.com/facebook/react/pull/26788), [#​29019](https://github.com/facebook/react/pull/29019), [#​28728](https://github.com/facebook/react/pull/28728), [#​28413](https://github.com/facebook/react/pull/28413) by [@​acdlite](https://github.com/acdlite) and [@​eps1lon](https://github.com/eps1lon)) - Support for Document Metadata. Adds `preinit`, `preinitModule`, `preconnect`, `prefetchDNS`, `preload`, and `preloadModule` APIs. - [#​25060](https://github.com/facebook/react/pull/25060), [#​25243](https://github.com/facebook/react/pull/25243), [#​25388](https://github.com/facebook/react/pull/25388), [#​25432](https://github.com/facebook/react/pull/25432), [#​25436](https://github.com/facebook/react/pull/25436), [#​25426](https://github.com/facebook/react/pull/25426), [#​25500](https://github.com/facebook/react/pull/25500), [#​25480](https://github.com/facebook/react/pull/25480), [#​25508](https://github.com/facebook/react/pull/25508), [#​25515](https://github.com/facebook/react/pull/25515), [#​25514](https://github.com/facebook/react/pull/25514), [#​25532](https://github.com/facebook/react/pull/25532), [#​25536](https://github.com/facebook/react/pull/25536), [#​25534](https://github.com/facebook/react/pull/25534), [#​25546](https://github.com/facebook/react/pull/25546), [#​25559](https://github.com/facebook/react/pull/25559), [#​25569](https://github.com/facebook/react/pull/25569), [#​25599](https://github.com/facebook/react/pull/25599), [#​25689](https://github.com/facebook/react/pull/25689), [#​26106](https://github.com/facebook/react/pull/26106), [#​26152](https://github.com/facebook/react/pull/26152), [#​26239](https://github.com/facebook/react/pull/26239), [#​26237](https://github.com/facebook/react/pull/26237), [#​26280](https://github.com/facebook/react/pull/26280), [#​26154](https://github.com/facebook/react/pull/26154), [#​26256](https://github.com/facebook/react/pull/26256), [#​26353](https://github.com/facebook/react/pull/26353), [#​26427](https://github.com/facebook/react/pull/26427), [#​26450](https://github.com/facebook/react/pull/26450), [#​26502](https://github.com/facebook/react/pull/26502), [#​26514](https://github.com/facebook/react/pull/26514), [#​26531](https://github.com/facebook/react/pull/26531), [#​26532](https://github.com/facebook/react/pull/26532), [#​26557](https://github.com/facebook/react/pull/26557), [#​26871](https://github.com/facebook/react/pull/26871), [#​26881](https://github.com/facebook/react/pull/26881), [#​26877](https://github.com/facebook/react/pull/26877), [#​26873](https://github.com/facebook/react/pull/26873), [#​26880](https://github.com/facebook/react/pull/26880), [#​26942](https://github.com/facebook/react/pull/26942), [#​26938](https://github.com/facebook/react/pull/26938), [#​26940](https://github.com/facebook/react/pull/26940), [#​26939](https://github.com/facebook/react/pull/26939), [#​27030](https://github.com/facebook/react/pull/27030), [#​27201](https://github.com/facebook/react/pull/27201), [#​27212](https://github.com/facebook/react/pull/27212), [#​27217](https://github.com/facebook/react/pull/27217), [#​27218](https://github.com/facebook/react/pull/27218), [#​27220](https://github.com/facebook/react/pull/27220), [#​27224](https://github.com/facebook/react/pull/27224), [#​27223](https://github.com/facebook/react/pull/27223), [#​27269](https://github.com/facebook/react/pull/27269), [#​27260](https://github.com/facebook/react/pull/27260), [#​27347](https://github.com/facebook/react/pull/27347), [#​27346](https://github.com/facebook/react/pull/27346), [#​27361](https://github.com/facebook/react/pull/27361), [#​27400](https://github.com/facebook/react/pull/27400), [#​27541](https://github.com/facebook/react/pull/27541), [#​27610](https://github.com/facebook/react/pull/27610), [#​28110](https://github.com/facebook/react/pull/28110), [#​29693](https://github.com/facebook/react/pull/29693), [#​29732](https://github.com/facebook/react/pull/29732), [#​29811](https://github.com/facebook/react/pull/29811), [#​27586](https://github.com/facebook/react/pull/27586), [#​28069](https://github.com/facebook/react/pull/28069) by [@​gnoff](https://github.com/gnoff), [@​sebmarkbage](https://github.com/sebmarkbage), [@​acdlite](https://github.com/acdlite), [@​kassens](https://github.com/kassens), [@​sokra](https://github.com/sokra), [@​sweetliquid](https://github.com/sweetliquid) - Add `fetchPriority` to `<img>` and `<link>` ([#​25927](https://github.com/facebook/react/pull/25927) by [@​styfle](https://github.com/styfle)) - Add support for SVG `transformOrigin` prop ([#​26130](https://github.com/facebook/react/pull/26130) by [@​arav-ind](https://github.com/arav-ind)) - Add support for `onScrollEnd` event ([#​26789](https://github.com/facebook/react/pull/26789) by [@​devongovett](https://github.com/devongovett)) - Allow `<hr>` as child of `<select>` ([#​27632](https://github.com/facebook/react/pull/27632) by [@​SouSingh](https://github.com/SouSingh)) - Add support for Popover API ([#​27981](https://github.com/facebook/react/pull/27981) by [@​eps1lon](https://github.com/eps1lon)) - Add support for `inert` ([#​24730](https://github.com/facebook/react/pull/24730) by [@​eps1lon](https://github.com/eps1lon)) - Add support for `imageSizes` and `imageSrcSet` ([#​22550](https://github.com/facebook/react/pull/22550) by [@​eps1lon](https://github.com/eps1lon)) - Synchronously flush transitions in popstate events ([#​26025](https://github.com/facebook/react/pull/26025), [#​27559](https://github.com/facebook/react/pull/27559), [#​27505](https://github.com/facebook/react/pull/27505), [#​30759](https://github.com/facebook/react/pull/30759) by [@​tyao1](https://github.com/tyao1) and [@​acdlite](https://github.com/acdlite)) - `flushSync` exhausts queue even if something throws ([#​26366](https://github.com/facebook/react/pull/26366) by [@​acdlite](https://github.com/acdlite)) - Throw error if `react` and `react-dom` versions don’t match ([#​29236](https://github.com/facebook/react/pull/29236) by [@​acdlite](https://github.com/acdlite)) - Ensure `srcset` and `src` are assigned last on `<img>` instances ([#​30340](https://github.com/facebook/react/pull/30340) by [@​gnoff](https://github.com/gnoff)) - Javascript URLs are replaced with functions that throw errors ([#​26507](https://github.com/facebook/react/pull/26507), [#​29808](https://github.com/facebook/react/pull/29808) by [@​sebmarkbage](https://github.com/sebmarkbage) and [@​kassens](https://github.com/kassens)) - Treat toggle and beforetoggle as discrete events ([#​29176](https://github.com/facebook/react/pull/29176) by [@​eps1lon](https://github.com/eps1lon)) - Filter out empty `src` and `href` attributes (unless for `<a href=”” />`) ([#​18513](https://github.com/facebook/react/pull/18513), [#​28124](https://github.com/facebook/react/pull/28124) by [@​bvaughn](https://github.com/bvaughn) and [@​eps1lon](https://github.com/eps1lon)) - Fix unitless `scale` style property ([#​25601](https://github.com/facebook/react/pull/25601) by [@​JonnyBurger](https://github.com/JonnyBurger)) - Fix `onChange` error message for controlled `<select>` ([#​27740](https://github.com/facebook/react/pull/27740) by [@​Biki-das](https://github.com/Biki-das)) - Fix focus restore in child windows after element reorder ([#​30951](https://github.com/facebook/react/pull/30951) by [@​ling1726](https://github.com/ling1726)) - Remove `render`, `hydrate`, `findDOMNode`, `unmountComponentAtNode`, `unstable_createEventHandle`, `unstable_renderSubtreeIntoContainer`, and `unstable_runWithPriority`. Move `createRoot` and `hydrateRoot` to `react-dom/client`. ([#​28271](https://github.com/facebook/react/pull/28271) by [@​gnoff](https://github.com/gnoff)) - Remove `test-utils` ([#​28541](https://github.com/facebook/react/pull/28541) by [@​eps1lon](https://github.com/eps1lon)) - Remove `unstable_flushControlled` ([#​26397](https://github.com/facebook/react/pull/26397) by [@​kassens](https://github.com/kassens)) - Remove legacy mode ([#​28468](https://github.com/facebook/react/pull/28468) by [@​gnoff](https://github.com/gnoff)) - Remove `renderToStaticNodeStream()` ([#​28873](https://github.com/facebook/react/pull/28873) by [@​gnoff](https://github.com/gnoff)) - Remove `unstable_renderSubtreeIntoContainer` ([#​29771](https://github.com/facebook/react/pull/29771) by [@​kassens](https://github.com/kassens)) ##### React DOM Server - Stable release of React Server Components ([Many, many PRs](https://github.com/facebook/react/pulls?q=is%3Apr+is%3Aclosed+%5BFlight%5D+in%3Atitle+created%3A%3C2024-12-01+) by [@​sebmarkbage](https://github.com/sebmarkbage), [@​acdlite](https://github.com/acdlite), [@​gnoff](https://github.com/gnoff), [@​sammy-SC](https://github.com/sammy-SC), [@​gaearon](https://github.com/gaearon), [@​sophiebits](https://github.com/sophiebits), [@​unstubbable](https://github.com/unstubbable), [@​lubieowoce](https://github.com/lubieowoce)) - Support Server Actions ([#​26124](https://github.com/facebook/react/pull/26124), [#​26632](https://github.com/facebook/react/pull/26632), [#​27459](https://github.com/facebook/react/pull/27459) by [@​sebmarkbage](https://github.com/sebmarkbage) and [@​acdlite](https://github.com/acdlite)) - Changes to SSR - Add external runtime which bootstraps hydration on the client for binary transparency ([#​25437](https://github.com/facebook/react/pull/25437), [#​26169](https://github.com/facebook/react/pull/26169), [#​25499](https://github.com/facebook/react/pull/25499) by [@​MofeiZ](https://github.com/mofeiZ) and [@​acdlite](https://github.com/acdlite)) - Support subresource integrity for `bootstrapScripts` and `bootstrapModules` ([#​25104](https://github.com/facebook/react/pull/25104) by [@​gnoff](https://github.com/gnoff)) - Fix null bytes written at text chunk boundaries ([#​26228](https://github.com/facebook/react/pull/26228) by [@​sophiebits](https://github.com/sophiebits)) - Fix logic around attribute serialization ([#​26526](https://github.com/facebook/react/pull/26526) by [@​gnoff](https://github.com/gnoff)) - Fix precomputed chunk cleared on Node 18 ([#​25645](https://github.com/facebook/react/pull/25645) by [@​feedthejim](https://github.com/feedthejim)) - Optimize end tag chunks ([#​27522](https://github.com/facebook/react/pull/27522) by [@​yujunjung](https://github.com/yujunjung)) - Gracefully handle suspending in DOM configs ([#​26768](https://github.com/facebook/react/pull/26768) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Check for nullish values on ReactCustomFormAction ([#​26770](https://github.com/facebook/react/pull/26770) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Preload `bootstrapModules`, `bootstrapScripts`, and update priority queue ([#​26754](https://github.com/facebook/react/pull/26754), [#​26753](https://github.com/facebook/react/pull/26753), [#​27190](https://github.com/facebook/react/pull/27190), [#​27189](https://github.com/facebook/react/pull/27189) by [@​gnoff](https://github.com/gnoff)) - Client render the nearest child or parent suspense boundary if replay errors or is aborted ([#​27386](https://github.com/facebook/react/pull/27386) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Don't bail out of flushing if we still have pending root tasks ([#​27385](https://github.com/facebook/react/pull/27385) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Ensure Resumable State is Serializable ([#​27388](https://github.com/facebook/react/pull/27388) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Remove extra render pass when reverting to client render ([#​26445](https://github.com/facebook/react/pull/26445) by [@​acdlite](https://github.com/acdlite)) - Fix unwinding context during selective hydration ([#​25876](https://github.com/facebook/react/pull/25876) by [@​tyao1](https://github.com/tyao1)) - Stop flowing and then abort if a stream is cancelled ([#​27405](https://github.com/facebook/react/pull/27405) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Pass cancellation reason to abort ([#​27536](https://github.com/facebook/react/pull/27536) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Add `onHeaders` entrypoint option ([#​27641](https://github.com/facebook/react/pull/27641), [#​27712](https://github.com/facebook/react/pull/27712) by [@​gnoff](https://github.com/gnoff)) - Escape `<style>` and `<script>` textContent to enable rendering inner content without dangerouslySetInnerHTML ([#​28870](https://github.com/facebook/react/pull/28870), [#​28871](https://github.com/facebook/react/pull/28871) by [@​gnoff](https://github.com/gnoff)) - Fallback to client replaying actions for Blob serialization ([#​28987](https://github.com/facebook/react/pull/28987) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Render Suspense fallback if boundary contains new stylesheet during sync update ([#​28965](https://github.com/facebook/react/pull/28965) by [@​gnoff](https://github.com/gnoff)) - Fix header length tracking ([#​30327](https://github.com/facebook/react/issues/30327) by [@​gnoff](https://github.com/gnoff)) - Use `srcset` to trigger load event on mount ([#​30351](https://github.com/facebook/react/issues/30351) by [@​gnoff](https://github.com/gnoff)) - Don't perform work when closing stream ([#​30497](https://github.com/facebook/react/issues/30497) by [@​gnoff](https://github.com/gnoff)) - Allow aborting during render ([#​30488](https://github.com/facebook/react/issues/30488), [#​30730](https://github.com/facebook/react/pull/30730) by [@​gnoff](https://github.com/gnoff)) - Start initial work immediately ([#​31079](https://github.com/facebook/react/issues/31079) by [@​gnoff](https://github.com/gnoff)) - A transition flowing into a dehydrated boundary no longer suspends when showing fallback ([#​27230](https://github.com/facebook/react/pull/27230) by [@​acdlite](https://github.com/acdlite)) - Fix selective hydration triggers false update loop error ([#​27439](https://github.com/facebook/react/pull/27439) by [@​acdlite](https://github.com/acdlite)) - Warn for Child Iterator of all types but allow Generator Components ([#​28853](https://github.com/facebook/react/pull/28853) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Include regular stack trace in serialized errors ([#​28684](https://github.com/facebook/react/pull/28684), [#​28738](https://github.com/facebook/react/pull/28738) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Aborting early no longer infinitely suspends ([#​24751](https://github.com/facebook/react/pull/24751) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Fix hydration warning suppression in text comparisons ([#​24784](https://github.com/facebook/react/pull/24784) by [@​gnoff](https://github.com/gnoff)) - Changes to error handling in SSR - Add diffs to hydration warnings ([#​28502](https://github.com/facebook/react/pull/28502), [#​28512](https://github.com/facebook/react/pull/28512) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Make Error creation lazy ([#​24728](https://github.com/facebook/react/pull/24728) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Remove recoverable error when a sync update flows into a dehydrated boundary ([#​25692](https://github.com/facebook/react/pull/25692) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Don't "fix up" mismatched text content with suppressedHydrationWarning ([#​26391](https://github.com/facebook/react/pull/26391) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Fix component stacks in errors ([#​27456](https://github.com/facebook/react/pull/27456) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Add component stacks to `onError` ([#​27761](https://github.com/facebook/react/pull/27761), [#​27850](https://github.com/facebook/react/pull/27850) by [@​gnoff](https://github.com/gnoff) and [@​sebmarkbage](https://github.com/sebmarkbage)) - Throw hydration mismatch errors once ([#​28502](https://github.com/facebook/react/pull/28502) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Add Bun streaming server renderer ([#​25597](https://github.com/facebook/react/pull/25597) by [@​colinhacks](https://github.com/colinhacks)) - Add nonce support to bootstrap scripts ([#​26738](https://github.com/facebook/react/pull/26738) by [@​danieltott](https://github.com/danieltott)) - Add `crossorigin` support to bootstrap scripts ([#​26844](https://github.com/facebook/react/pull/26844) by [@​HenriqueLimas](https://github.com/HenriqueLimas)) - Support `nonce` and `fetchpriority` in preload links ([#​26826](https://github.com/facebook/react/pull/26826) by [@​liuyenwei](https://github.com/liuyenwei)) - Add `referrerPolicy` to `ReactDOM.preload()` ([#​27096](https://github.com/facebook/react/pull/27096) by [@​styfle](https://github.com/styfle)) - Add server condition for `react/jsx-dev-runtime` ([#​28921](https://github.com/facebook/react/pull/28921) by [@​himself65](https://github.com/himself65)) - Export version ([#​29596](https://github.com/facebook/react/pull/29596) by [@​unstubbable](https://github.com/unstubbable)) - Rename the secret export of Client and Server internals ([#​28786](https://github.com/facebook/react/pull/28786), [#​28789](https://github.com/facebook/react/pull/28789) by [@​sebmarkbage](https://github.com/sebmarkbage)) - Remove layout effect warning on server ([#​26395](https://github.com/facebook/react/pull/26395) by [@​rickhanlonii](https://github.com/rickhanlonii)) - Remove `errorInfo.digest` from `onRecoverableError` ([#​28222](https://github.com/facebook/react/pull/28222) by [@​gnoff](https://github.com/gnoff)) ##### ReactTestRenderer - Add deprecation error to `react-test-renderer` on web ([#​27903](https://github.com/facebook/react/pull/27903), [#​28904](https://github.com/facebook/react/pull/28904) by [@​jackpope](https://github.com/jackpope) and [@​acdlite](https://github.com/acdlite)) - Render with ConcurrentRoot on web ([#​28498](https://github.com/facebook/react/pull/28498) by [@​jackpope](https://github.com/jackpope)) - Remove `react-test-renderer/shallow` export ([#​25475](https://github.com/facebook/react/pull/25475), [#​28497](https://github.com/facebook/react/pull/28497) by [@​sebmarkbage](https://github.com/sebmarkbage) and [@​jackpope](https://github.com/jackpope)) ##### React Reconciler - Enable suspending commits without blocking render ([#​26398](https://github.com/facebook/react/pull/26398), [#​26427](https://github.com/facebook/react/pull/26427) by [@​acdlite](https://github.com/acdlite)) - Remove `prepareUpdate` ([#​26583](https://github.com/facebook/react/pull/26583), [#​27409](http://github.com/facebook/react/pull/27409) by [@​sebmarkbage](https://github.com/sebmarkbage) and [@​sophiebits](https://github.com/sophiebits)) ##### React-Is - Enable tree shaking ([#​27701](https://github.com/facebook/react/pull/27701) by [@​markerikson](https://github.com/markerikson)) - Remove `isConcurrentMode` and `isAsyncMode` methods ([#​28224](https://github.com/facebook/react/pull/28224) by [@​gaearon](https://github.com/gaearon)) ##### useSyncExternalStore - Remove React internals access ([#​29868](https://github.com/facebook/react/pull/29868) by [@​phryneas](https://github.com/phryneas)) - Fix stale selectors keeping previous store references ([#​25969](https://github.com/facebook/react/pull/25968) by [@​jellevoost](https://github.com/jellevoost)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45OS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTEzLjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImRlcGVuZGVuY2llcyJdfQ==--> Reviewed-on: https://git.tristess.app/alexandresoro/ouca-web/pulls/6 Reviewed-by: Alexandre Soro <[email protected]> Co-authored-by: renovate <[email protected]> Co-committed-by: renovate <[email protected]>
Summary
While working on the new Next.js router which heavily relies on useReducer I noticed that
group
andgroupCollapsed
which both take labels were showing as-is in the console for the second render/dispatch in Strict Mode logs. While looking at the code I found thatinfo
was also not instrumented.I've added additional handling for:
info
group
groupCollapsed
How did you test this change?
Looked at earlier PRs and copied the blocks for the
error
case in the same file to cover the other console methods.Example of the change.
prefetch
is before,navigate
is after: