We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
react changelog
Hey there, fellow developers! Here's a rundown of the latest and greatest changes we've made. We've packed in some awesome new features, improvements, and bug fixes to make your experience even better. Check out the details below! ๐โจ
New Features
-
Fusebox Integration for DevTools: We've added a shiny new package called
react-devtools-fusebox
, which serves as the entry point for the React DevTools Frontend in Chrome DevTools. This package builds scripts in ESM format and includes styles in a separate.css
file, ensuring everything loads smoothly. ๐ -
Custom Messaging Protocol for DevTools: The RDT backend now has a method called
connectWithCustomMessagingProtocol
, allowing for custom messaging protocols between the frontend and backend. This is a game-changer for non-browser RDT integrations! ๐ -
Theme Support in DevTools Fusebox: You can now propagate themes from Chrome DevTools frontend to React DevTools Fusebox. The theme field is optional, and future improvements will allow DevTools to listen to theme changes and update automatically. ๐จ
-
Promise as a Child Test in Flight Fixture: We've added a Promise as a child test to the Flight fixture, demonstrating the use of asynchronous behavior in UI rendering. This ensures that the Promise as a child hydrates without errors. ๐
-
Scaffolding for requestFormReset API: We've laid the groundwork for the requestFormReset API by introducing a new ReactDOM export and setting up the internal dispatcher method. Stay tuned for the full implementation! ๐๏ธ
Improvements
-
Hydration Scheduling with Event Priority: Hydration scheduling now uses real event priority instead of the reconciler's update priority when no explicit update priority is set. This change ensures more accurate and efficient hydration scheduling. ๐
-
Limited Test Utils Builds: We've introduced a flag to disable test-utils in many builds and removed test-utils implementations from unsupported builds. This ensures proper functionality with tests in different build configurations. ๐งช
-
Shortened ReactDOMCurrentDispatcher Method Names: We've optimized method names in ReactDOMCurrentDispatcher by shortening them to align with hint codes used in Flight. This makes the code more concise and easier to understand. โ๏ธ
Bug Fixes
-
Backwards Compatibility for String Refs on WWW: We've fixed errors with undefined string ref values when syncing, ensuring smooth functioning and compatibility with string refs in React components. ๐ ๏ธ
-
Assertions Flushed Before
act
in Tests: We've fixed cases where assertions were not flushed before theact
function in tests. This prevents blocking issues and improves the testing environment. โ -
No Preloading Images Inside
<noscript>
: We've updated the<noscript>
scope check to prevent preloading images inside<noscript>
tags, addressing the issue raised in #27910. ๐ผ๏ธ
That's all for now! Keep coding and enjoy the new features and improvements. Happy developing! ๐๐ฉโ๐ป๐จโ๐ป
Here's the latest and greatest from our development team! ๐
New Features
- Enable feature flags for v19: We've turned on the feature flags for version 19 (v19) in the canary channel. This update includes enabling various experimental features like
enableRefAsProp
,disableStringRefs
, andenableBigIntSupport
. Get ready to experiment! ๐ (#28647)
Improvements
-
Remove IndeterminateComponent: We've streamlined the React codebase by removing the deprecated IndeterminateComponent. Say hello to
IncompleteFunctionComponent
for supporting Suspense in legacy mode. This change simplifies our code and removes outdated features. ๐งน (#28681) -
Move string ref coercion to JSX runtime: The string ref implementation has been shifted from Fiber to the JSX runtime. This subtle change converts string refs to callback refs during element creation, affecting only Meta since string refs are disabled in open source. ๐ฆ (#28473)
-
Make class prop resolution faster: We've optimized class prop resolution by removing the
ref
prop before handling default props, eliminating the need to clone the object twice. This makes the process faster and more efficient. โก (#28766)
Bugfixes
-
Emit Server Error Prefix in the .stack Property Too: Fixed an issue where the prefix of a server error wasn't displayed in the console when using V8. Now, the error message will be properly displayed, improving the debugging experience. ๐ (#28738)
-
Fix: Class components should "consume" ref prop: Addressed the issue where class components did not automatically attach the class instance to the ref's current property. Now, the ref is removed from the props object before passing it to lifecycle methods, ensuring existing code doesn't break. ๐ ๏ธ (#28719)
-
Hardcode enableLegacyFBSupport flag: Simplified the configuration by hardcoding the
enableLegacyFBSupport
flag to true, ensuring legacy Fiber support is always enabled. ๐ง (#28701)
Chores
- Cleanup enableBigIntSupport flag: Cleaned up the
enableBigIntSupport
flag by removing its usage and imports across various files. ๐งผ (#28711)
That's all for now, folks! Keep coding and stay awesome! โจ