We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
react changelog
Welcome to the latest updates in our codebase! We've been busy squashing bugs, adding some cool new features, and making improvements that are sure to enhance your experience. Here's a rundown of what's been happening:
Bugfix π
- Fix Overlapping "message" Bug in Performance Track (#31528): We've tackled a pesky issue where overlapping events were causing chaos in React's performance tracking. Now, the end time of the last render is stored to prevent any mishaps, ensuring smoother performance tracking.
- [compiler] Repro for reactive ref.current accesses (#31519): A bug in handling
ref.current
dependencies has been fixed. We've added a test fixture to make sure those reactive dependencies are tracked accurately, so your components behave just as they should. - [compiler] Repro for mutable range edge case (#31479): An edge case involving mutable ranges and aliasing in function expressions has been addressed. Test fixtures now ensure our compiler handles these scenarios like a pro.
New Features β¨
- Export __COMPILER_RUNTIME in stable (#31540): The compiler is now part of stable releases like React 19 RC, making it more accessible for developers who want to harness its power.
- Turn on enableSiblingPrerendering in canary (#31541): We've flipped the switch on the
enableSiblingPrerendering
feature flag, paving the way for exciting new capabilities in the upcoming release candidate. - [Flight] Add initial readme to react-server package (#31464): A shiny new README for the
react-server
package is here! It covers theprerender
API for Flight, giving you a head start on implementing React Server Components.
Improvements π
- Only log component level profiling for components that actually performed work (#31522): We've streamlined component-level profiling by focusing on components that truly impact performance, reducing noise and making logs more actionable.
- Make prerendering always non-blocking with fix (#31452): Prerendering is now non-blocking, eliminating issues with infinite render loops and enhancing stability.
- Format event with "warning" yellow and prefix with "Event: " (#31536): Event logging just got a makeover with a "warning" yellow color and a consistent naming format, making it easier to track events in the rendering process.
Chore π§Ή
- (chore): copy fix in precedence error (#31524): We've corrected a typo in an error message related to
<style>
tag usage, ensuring clarity in error reporting.
That's all for now! We hope these updates make your development journey smoother and more enjoyable. Keep coding and stay awesome! π
Welcome to the latest round of updates! We've been busy bees, buzzing around making improvements, squashing bugs, and adding cool new features to make your experience even better. Here's what's new:
New Features
- Flight Prerendering with
enableHalt
: π We've introduced theenableHalt
feature for flight prerenders, allowing aborts to be treated as indefinitely stalled rather than errors. This makes the system more robust and user-friendly by pausing serialization for async data types when accessed by the client. - Dynamic Module Type Resolution: π A new environment configuration option lets you resolve imported module types on the fly, making the compiler more flexible and efficient.
- DevTools Owner Path Identification: π΅οΈββοΈ Now you can find Server Component owners by traversing the parent path, improving DevTools' functionality.
- Function Return Type Inference: π§ The compiler now infers return types for function expressions, enhancing type management and error handling.
- Ref-in-Render Fixture: 𧩠We've added a fixture to highlight issues with refs in render when using
useCallback
, improving documentation and testing.
Improvements
- Ref Access Flexibility: π§ Functions containing refs can now be returned, offering more flexibility, especially in hooks.
- Compiler Return Identifier: π·οΈ We've added a
returnIdentifier
to function expressions for better type information management. - Ref Mutability Handling: π Refs and their
.current
values are now excluded from having mutable ranges, preserving memoization integrity.
Bugfixes
- Rendering Aborts and Throws: π οΈ Fixed an issue where errors thrown after aborting a render were mishandled, ensuring proper error tracking and robustness.
- Flight Halted Row Reversion: π We reverted the halted row feature in Flight, simplifying promise handling.
- Turbopack Unbundled Removal: ποΈ Removed the unbundled RSC prototype from Turbopack, focusing on integrated server/client experiences.
Chore
- CI Configuration Cleanup: π§Ή Removed the
CI_MAX_WORKERS
option from Flow configurations as part of our migration to GitHub Actions.
That's all for now, folks! Keep exploring, keep building, and stay tuned for more exciting updates coming your way. π
Hey there, fellow React enthusiasts! We've been busy bees π making some exciting updates and improvements to our beloved React ecosystem. Here's a roundup of the latest and greatest changes we've rolled out. Dive in and explore what's new and improved!
-
New Feature: Server Component Support in DevTools
We've added VirtualInstances to the React DevTools tree, making it easier for you to visualize and manage Server Components. Now, a single Server Component instance can appear as one instance, even if it's a parent to multiple children. This means a cleaner, more efficient tree structure for you to work with. However, keep an eye out for some quirky behavior during updates, especially with list reorders. We're working on making it even smoother! -
New Feature: Macro Methods in the Compiler
Say hello to macros as methods! We've expanded the React compiler to support macros invoked as methods, not just function calls or JSX. This means more flexibility in defining macros, likemyMacro.*.foo.bar
. The compiler now builds a map of partially-satisfied macro patterns, recognizing when a macro pattern is fully satisfied. This enhancement is all about giving you more power and flexibility in your coding adventures. -
New Feature: Experimental
renderToHTML
Function
We've rolled out theexperimental_renderToHTML
function in thereact-markup
package. It's perfect for generating HTML markup in contexts like email templates that use Server Components. With a nod to its experimental status, this function is all about pushing the boundaries and seeing what's possible. -
New Feature: Prerendering in Flight
Introducing prerendering in the Flight framework, similar to Fizz. Instead of an immediate stream result, you get a promise that resolves to the stream once prerendering is complete. This enhancement improves error handling and streamlines the prerendering process, making Flight even more robust and reliable. -
New Feature: Increment/Decrement Support in Compiler
We've added support for increment (++
) and decrement (--
) operations on member expressions in the React compiler. This means expressions likea.x++
are now handled seamlessly, preserving the semantics of these operations. More power to you when managing member expression updates! -
Improvement: Promotion of Temporaries in Compiler
We've improved how the React compiler handles temporaries to prevent unintended code reordering over side-effectful operations. This ensures that your code executes in the intended order, preventing unexpected behaviors and keeping everything running smoothly. -
Bugfix: Unhandled Rejection in Flight
We've squashed a bug that caused unhandled promise rejection errors in Flight when aborting a synchronous operation. Now, errors after an abort are properly handled, making the error handling in React's server components more robust. -
New Feature:
useTransition
Support in Compiler
TheuseTransition
hook is now supported in the Forget compiler, marking thestartTransition
function as stable. This enhancement is all about managing concurrent state updates more effectively, giving you more control and stability in your React applications. -
Improvement: Server Component Key in DevTools
We've enhanced DevTools to display the key of a Server Component, aiding the reconciliation process and preserving instance equality during reorders. This improvement helps you better understand component hierarchies and relationships, even if keys can be a bit confusing with filtering. -
Bugfix: Path Fix in CI Workflow
We've corrected an incorrect path in thecompiler_typescript.yml
GitHub Actions workflow. This fix ensures that the workflow triggers correctly when changes are made, keeping our CI process running smoothly. -
Bugfix:
unstable_useContextWithBailout
Dispatcher Assignment
We've fixed an issue with theunstable_useContextWithBailout
dispatcher assignment, ensuring unique assignments across different dispatcher instances. This fix is all about maintaining context integrity and preventing potential issues from shared references.
We hope these updates make your React journey even more enjoyable and efficient! Stay tuned for more exciting developments, and happy coding! π
### Hey there, fellow devs! π
We've got a bunch of exciting updates, improvements, and bug fixes to share with you. Buckle up and let's dive into the latest changes!
#### New Features
- **DevTools Fiber Backend Refactor**: We've started refactoring the DevTools Fiber backend to build a filtered shadow tree by listening to each commit from Fiber and traversing the tree. This new approach enhances resilience to different Fiber implementations and improves the accuracy of shadow trees. π³
- **Highlighting HostSingletons, Hoistables, and Resources**: The DevTools now support highlighting and inspecting new Float types, including HostSingletons, Hoistables, and Resources. This makes it easier to trace the origins of resources and improves the debugging experience. π
- **Compiler's DeclarationId**: Added `Identifier.declarationId` and a simulated opaque type `DeclarationId` to uniquely identify variables in the original source code. This helps maintain SSA form throughout compilation while distinguishing between SSA and non-SSA versions. π
- **Global Mutation Effects in Hooks**: The compiler now allows global mutation effects in arguments passed to hooks and their return values, enhancing flexibility while maintaining React's side effect principles. π
- **LowerContextAccess Pass**: Introduced a new compiler pass for internal profiling to optimize context access by synthesizing selector functions from context accesses. This enhances performance by reducing unnecessary context retrieval. βοΈ
- **Rewrite useContext Callee**: Modified the compiler to allow specifying a custom callee for `useContext`, enabling internal experimentation with context access for potential performance improvements. π§ͺ
- **Nightly and Manual Compiler Releases**: Added workflows for publishing compiler packages on the same schedule as React packages, including nightly builds and manual releases. This ensures consistent and streamlined package management. π
- **Publishing Packages to npm**: Updated workflow to actually publish packages to npm, automating the release process and enhancing efficiency. π¦
#### Improvements
- **DevTools Global for Native**: Introduced `__IS_NATIVE__` global for differentiating backend implementation for `react-devtools-core` in React Native. This improves error reporting and tailors the experience for React Native developers. π±
#### Bugfixes
- **ValidatePreserveMemo x useRef Bug**: Fixed an issue where the `useRef` hook wasn't preserving references correctly within memoized components, ensuring reliable state management. π§
- **Fix Incorrect Tags for Compiler Releases**: Corrected the tagging process for compiler releases, ensuring that the correct tags are pushed during the release process. π·οΈ
- **Shared Lint Cache Key**: Resolved an issue with the caching mechanism in the shared linting workflow, ensuring jobs can successfully hit the cache by using consistent hash values. ποΈ
That's all for now, folks! Happy coding! π
Welcome to the latest batch of updates, where we've sprinkled in some magic to make your development experience even more delightful! π Here's what's new:
New Features
-
Internal Performance Profiling with Context Bailout: Introducing
unstable_useContextWithBailout
! This temporary hook lets you provide a comparison function along with a Context to determine if Context propagation and rendering should bail out earlier. It's all about making those updates snappier! π -
DevTools Gets Smarter: Say hello to
DevToolsInstance
! This new feature helps track Server Components more effectively by distinguishing betweenFiberInstance
(Client Components) andVirtualInstance
(Server Components). Expect a smoother, more intuitive DevTools experience. π οΈ -
Flight Logs with Owner Stacks: When replaying logs on the client, owner stacks are now enabled. This makes debugging easier by providing more context, even outside specific rendered components. π«
-
GH Actions for Prereleases: We've added new workflows for publishing prereleases using GitHub Actions. This ensures a seamless transition from CircleCI, keeping everything running smoothly. π§
Improvements
-
Abort Fizz Renders Mid-flight: You can now abort Fizz renders during their execution, preventing incomplete render states and ensuring task counting stays consistent. π
-
Snappy Element Inspection in DevTools: We've ditched timers for batching bridge traffic, making Element Inspection feel much more responsive. No more sluggish interactions! β‘
-
Resolved Props Handling: Resolved outlined props are now assigned to both the element tuple and the parsed element object, ensuring integrity and performance during rendering. π§©
Bugfixes
-
Global Updates in Callbacks: Fixed an issue where updates to global variables within callbacks were not retained. Your global state should now behave as expected during component renders. π
-
Nested Scopes in Promoted Temporaries: Ensuring that nested scopes within pruned ones are correctly visited and promoted, making the compiler more robust. π΅οΈββοΈ
-
fbt Plural and Macro Bugs: Added test fixtures to address pluralization and macro property bugs in the fbt framework. This helps ensure your translations are accurate and reliable. π
Chores
- Farewell CircleCI: We've completed our migration to GitHub Actions and bid adieu to
.circleci
. Streamlined workflows ahead! π
That's a wrap on the latest updates! Dive in and enjoy the enhanced performance, smarter DevTools, and more reliable rendering. Happy coding! π
Changelog
Hey there, fellow coders! Here's what's new, fixed, and improved in our latest update. π
New Features
- Owner Stacks in DevTools: We've introduced "owner stacks" to the React DevTools. When
enableOwnerStacks
is on, you'll get more detailed component relationships in your debugging info. If it's off, we'll fall back to parent stacks. This makes it easier to see who rendered what! π¨ (#30417) - Filter Stack Frames in RSC Server: Customize your stack traces with the new
filterStackFrame
option. Exclude those peskynode_modules
or any other functions you don't want cluttering your error reports. π§Ή (#30447) - DevTools Regression Workflow: Say hello to our new GitHub Actions workflow for running regression tests on React DevTools. Keeping things smooth and bug-free! π§ͺ (#30406)
- Find Source Map URL in ReactNoopFlightClient: Added the
findSourceMapURL
function to improve source map handling. Better debugging, here we come! π (#30395) - Temporary Fork for Runtime Commit Artifacts: Testing new workflows without merging into the main branch just got easier with our temporary fork. Safe and sound! π οΈ (#30472)
Improvements
- Prefix Owner Stacks in Console Logs: Now, when an error or warning is logged, the current stack is prefixed, making it easier to trace issues. Debugging just got a whole lot simpler! π (#30427)
- Environment Name in Virtual URL and Source Map: Added environment names to virtual URLs and
findSourceMapURL
to help locate source maps across multiple server environments. π (#30452) - Identifier Mutable Ranges in Compiler: Stopped relying on identifier mutable ranges after constructing scopes. This improves the integrity of the memoization process. π§ (#30428)
Bugfixes
- (Arrow)FunctionExpressions Insertion: Fixed an issue where inserting new (Arrow)FunctionExpressions as siblings broke the outlining process. Now, they are correctly inserted as true siblings. π― (#30446)
- Deduped Props in Lazy Elements: Resolved a bug where references to deduped props in lazy elements caused runtime errors. Now, we wait for the lazy element's chunk to resolve. π οΈ (#30441)
- False Positive in ValidatePreserveManualMemo: Addressed a false positive issue in the
ValidatePreserveManualMemo
function. More accurate validations coming your way! βοΈ (#30431)
Chore
- Remove CircleCI DevTools Tests: We've migrated our DevTools regression tests to GitHub Actions, so the old CircleCI workflow is now history. ποΈ (#30468)
That's all for now, folks! Keep coding and stay awesome! π»β¨
Welcome to the latest updates! We've been busy making some exciting changes and improvements. Here's a rundown of what's new and improved:
New Features
- Show Outlined Functions in Logging and Playground: We've enhanced the compiler to show outlined functions in logging and the playground, giving you better visibility and understanding of outlined functions during compilation and reactive function generation. π
- Add
process_artifacts_combined
Job: A new job has been added to streamline artifact handling in the workflow, making necessary files easily accessible and organized for future use. - Add
run_fixtures_flight_tests
Workflow: Automate running Flight tests on fixtures, ensuring consistent execution and archiving results for analysis. - Add
check_error_codes
Step: This new step in the GitHub Actions workflow searches for unminified errors, enhancing our automated testing and validation process. - Add
RELEASE_CHANNEL_stable_yarn_test_dom_fixtures
Workflow: This workflow checks fixtures DOM in the stable release channel, improving the testing process for stable releases.
Improvements
- Use
yargs
to Parse Args indownload-experimental-build
: The script now usesyargs
to parse arguments, adding flexibility and improving user experience with a summary message. - Parallelize
yarn build
: By parallelizing the build process, we've significantly reduced build times, enhancing efficiency for contributors. - Fork
download-experimental-build.js
for GitHub Actions: We've forked the original script to make it easier to review and eventually streamline the process of downloading experimental build artifacts.
Bugfixes
- Fix Sizebot Job Dependency: Addressed an issue with the sizebot job by adding the necessary
build_and_lint
dependency. - Update Sizebot Node Modules Caching Strategy: Improved caching strategy to ensure correct modules are cached for the sizebot download job.
- Don't Wrap Non-ASCII FBT Operands in JSXExpressionContainer: Fixed an issue in the compiler to handle non-ASCII FBT operands appropriately, ensuring they are not wrapped unnecessarily.
Chores
- Remove
RELEASE_CHANNEL_stable_yarn_test_dom_fixtures
from CircleCI: Streamlined the build process by removing unnecessary steps and configurations related to DOM fixture tests.
We hope these updates make your development experience smoother and more efficient. Happy coding! π
Hey there, fellow code wranglers! We've got some nifty updates and fixes coming your way. Check out the highlights below to see what's new and improved. π
New Features
- Add React Native Fork of
consoleWithStackDev
: We've added a React Native fork ofconsoleWithStackDev
to enhance error handling and warning filtering for React Native. This update helps maintain the interplay betweenconsoleWithStackDev
, DevTools, and error dialogs in userspace. - Support for Serializing
Map
andSet
in Console Logs: Now you can fully serializeMap
andSet
objects in console logs. This change ensures better debugging and logging of these data structures. - Feature Flag to Disable Legacy Context for Function Components: Introduced a feature flag to disable legacy context for function components, aiming to streamline the API and prepare for the complete removal of legacy context in the future.
- Support for
TSInterfaceDeclaration
: Added support forTSInterfaceDeclaration
in the compiler, fixing a previously unsupported scenario and ensuring that the transformation process handles such statements correctly.
Bugfixes
- Remove
propTypes
on Instance Warning: Removed the outdated warning for usingpropTypes
as an instance property in React 19 sincepropTypes
are no longer supported. - Override
getCurrentStack
Temporarily While Printing Errors: Updated the Fiber module to overridegetCurrentStack
temporarily for parent stacks while printing errors, ensuring proper error handling and stack trace appending. - Dedupe Legacy Context Warnings: Ensured that warnings about legacy APIs are only raised once per component, preventing duplicate warnings and improving the clarity of the warning system.
Improvements
- Serialize Rate-Limited Objects in Console Logs: Introduced a marker for rate-limited objects in console logs, which can be emitted as a getter. Increased the object limit in console logs to optimize logging and reduce strain on server and client resources.
That's all for now, folks! Keep coding, keep improving, and stay awesome! ππ©βπ»π¨βπ»
Welcome to the latest updates! Hereβs a rundown of the exciting new features, improvements, and bug fixes:
New Features
-
Implemented
captureStackTrace
and Owner Stacks on Server in Flight: Now, owner stacks are wired up to shared internals, exposing them tocaptureOwnerStack()
. This enhances error logging and debugging by adding owner stacks to errors logged by React. π -
Fizz Debug Info: Weβve added the
debugInfo
feature to Fizz, allowing you to track Server Component parent stacks and the correct owner stack for lazy components. This makes debugging a breeze! π΅οΈββοΈ -
Track Current Debug Task for Error Callbacks in Fizz: Now, when an error is thrown, the current debug task is tracked and used to run
onError
callbacks within the task's context. This ensures the right async stack is shown during debugging.
Improvements
-
Console.createTask During SSR in Fizz: Weβve updated Fizz to run
console.createTask
during server-side rendering (SSR) when available. This allows you to view component stacks when inspecting the Node.js server using--inspect
and Chrome DevTools. π οΈ -
Enhanced Flow Support in Playground: The playground now better supports Flow files by assuming a file is a Flow file when it sees
flow
anywhere in the file. It parses these files using the Hermes parser and disables TypeScript-specific features of the Monaco editor.
Bugfixes
-
Gate LegacyContext Field on
disableLegacyContext
in Fizz: To conserve fields and avoid unnecessary runtime usage in modern builds, the legacyContext field is now gated ondisableLegacyContext
. -
Clone Computation Block in Change Detection Mode: In change-detection mode, nodes are now cloned instead of spreading the contents of the computation block twice. This prevents mutations from affecting both places where the block is used, ensuring the overall transform result is not broken.
-
Regression Test for Issue #30172: Added an additional test to ensure deduped objects in nested children of blocked models are resolved correctly, preventing regressions.
-
No StrictMode Warnings for Production Renderer Builds: StrictMode warnings are now excluded from production renderer builds, as they are intended for development only. This ensures a cleaner display for React applications running in production mode.
Thatβs all for now! Keep coding and enjoy the new features and improvements! π
Welcome to the latest updates! Here's a rundown of the coolest changes and fixes we've made recently. π
New Features
-
Optimize Instruction Reordering: We've turbocharged the compiler with a new instruction reordering strategy! Now,
LoadLocal
instructions can be reordered more efficiently, and statement blocks have a more optimal reordering process. This helps merge scopes better and reduces memo slots in fixtures. -
New Flags GitHub Action: We've added a new GitHub action for checking yarn flags. This mirrors the existing CircleCI workflow to ensure everything runs smoothly on both platforms.
-
New Fizz GitHub Action: Introduced a GitHub action for checking the inlined Fizz runtime. This action ensures that the Fizz runtime is always up to date by mirroring the CircleCI workflow.
-
New Package:
react-html
: Say hello toreact-html
! This new package includes arenderToMarkup
export for rendering HTML that isn't meant to be hydrated. Perfect for emails, RSS feeds, and more. -
New Lint GitHub Action: We've added a new linting action to GitHub. This action runs prettier, eslint, and other checks to keep our codebase in tip-top shape.
Bugfixes
-
Validate Against Locals Being Reassigned After Render: Added a validation pass to ensure local variables aren't reassigned by functions called after rendering. This prevents inconsistencies in subsequent renders.
-
Warn for Invalid Type in Renderer: Improved error handling for invalid types in the renderer, ensuring the correct stack trace is shown. This is all behind the
enableOwnerStacks
flag. -
Examples of Invalid Code Reassigning Locals Outside of Render: Added test fixtures to handle cases where local variables are wrongly reassigned outside of the render function.
-
Repro for Nested Function Local Reassignment Issue: Introduced a repro case demonstrating issues with nested function local reassignments. This helps pinpoint and address the problem.
-
New Error Message for Awaiting the Client Export: Updated the error message for attempting to await client exports, making it clearer and more helpful for avoiding incorrect usage.
Chores
- Remove CircleCI Yarn Flags Job: We've removed the CircleCI yarn_flags job now that it's been migrated to GitHub actions. This helps streamline our CI/CD process.
That's all for now! Keep coding, keep smiling, and stay awesome! πβ¨
Hey there, fellow React enthusiasts! We've got a fantastic set of updates for you. From new features to important bugfixes, here's what's new and improved in our latest release:
New Features π
-
Custom fbt-like Macro Functions in Compiler: The compiler now supports custom fbt-like macro functions! This means you can define and use custom macros similar to fbt, enhancing your application's capabilities. We've updated the Environment configuration schema to include a
customMacros
field and made necessary changes across various files to support this feature. -
CaptureOwnerStack API in DEV Builds: Introducing
captureOwnerStack
, a new API available only in development builds. This allows you to implement similar functionality toconsole.error
in user space. Note that this API does not include the current stack fromnew Error().stack
, so you'll need to add that yourself. -
Method-call Version of Macro Functions: The compiler now supports
macro.namespace(...)
style invocations, adding more flexibility to how you use macros. We've tested various scenarios to ensure everything works smoothly and fixed a few bugs along the way. -
React Native 0.75 Feature Flags: We're prepping for React Native 0.75 with updated feature flags. This ensures a smooth transition to React 19, improving performance and compatibility.
Improvements π
-
React DevTools 5.3.0: The latest version of React DevTools brings several enhancements. We've improved console argument formatting, unified console patching, made source maps URL relative, and fixed various inspection and error reporting issues. Plus, component badges are now visible in light mode!
-
Treat Ref-like Named Objects as Refs: The compiler now treats objects named
ref
or ending withRef
, and containing a property namedcurrent
, as React refs. This update addresses false positives in analysis when using custom hooks.
Bugfixes π
-
Non-reactive Dispatch Function from useActionState: The dispatch function from
useActionState
is now considered non-reactive, ensuring better performance and fewer unnecessary re-renders. -
Dynamic Feature Flag Removal and Revert: We initially removed the dynamic feature flag
enableSchedulingProfiler
but then reverted this change based on feedback. This ensures the dynamic control of the scheduling profiler remains intact. -
Console Patching Unification: By default, React DevTools will now use ANSI escape symbols for dimming, ensuring consistency across terminals and browser consoles. For Firefox, which doesn't support ANSI escape symbols, we fallback to CSS properties.
Enjoy these updates and happy coding! π
Here's the latest and greatest update on our project! π Check out the new features, improvements, and bug fixes we've rolled out:
### New Features
- **Support for Custom fbt-like Macro Functions**: The compiler now supports custom fbt-like macro functions! This allows developers to specify functions that compile as macros, enhancing the flexibility and power of the compiler. π
- **MetaProperty Support**: We've added support for MetaProperty expressions in the compiler, allowing for more versatile coding scenarios. This includes updates to handle MetaProperty expressions and necessary test fixtures.
- **Pruned-Scope Terminal in HIR**: Introducing the PrunedScopeTerminal to the Higher-level Intermediate Representation (HIR) in the compiler. This new terminal type allows for scope-pruning passes to operate on HIR, paving the way for future optimizations.
- **HIR-based FlattenReactiveLoops**: We've implemented an HIR-based version of FlattenReactiveLoops, progressing towards HIR-everywhere. This change prunes reactive scopes within loops to simplify reconciliation.
### Improvements
- **Errored/Blocked Direct References Handling**: Errored or blocked direct references now turn the nearest element lazy, letting the nearest Suspense/Error Boundary handle it. This improvement enhances error tracking and handling during serialization of properties.
- **Nearest Parent of Errored Promise as Owner**: The nearest parent of an errored promise is now considered its owner/task, ensuring accurate error handling, especially with Server Components.
### Bugfixes
- **Treat Pruned Scope Outputs as Reactive**: Outputs of pruned reactive scopes are now treated as reactive, addressing inconsistencies where downstream scopes could depend on non-memoized values.
- **Remove Warning Prefix and toString on Console Arguments**: We've removed the 'Warning: ' prefix and automatic toString conversion on console.error and console.warn, allowing for richer and clearer logging.
- **Revert Bad Push**: Reverted a previous bad push to correct workflow and artifact handling issues.
### Chore
- **Remove Unused Scripts**: Cleaned up the compiler's package.json file by removing unused scripts, making the codebase cleaner and more efficient.
That's all for now! Keep coding and stay awesome! ππ»
Welcome to the latest updates! We've been hard at work squashing bugs, adding new features, and making improvements. Here's the scoop on what's new and improved:
New Features
-
Shallow Prop Diffing Experiment: Added the
enableShallowPropDiffing
feature flag to test simplifying object prop comparisons with===
instead of deep diffing. This aims to reduce JS-side computation while sending more data to native. π -
Non-Reactive
useReducer
Dispatch: Updated the dispatch function fromuseReducer
to be stable and non-reactive. This ensures better performance and stability when usinguseReducer
. π οΈ
Improvements
-
Async Scheduling in Flight and Fizz: Updated non-legacy uses to be asynchronous using the best available macrotask scheduler. The browser now uses
postMessage
, Bun usessetTimeout
, and the FB build also usessetTimeout
. This change improves the efficiency of work scheduling. β³ -
Abort During Render in React Flight: Enhanced abort logic to mark currently rendering tasks as aborted, allowing the current render to emit a partially serialized model with an error reference. This prevents the entire model from being replaced by an aborted error. π
-
Enhanced Stack Frames in Console Logs: Improved visibility of stack frames in console logs by prefixing owner stacks with the current stack at the console call. This helps in better debugging by showing the most important frames, like the name of the current component. π
Bugfixes
-
ip
Dependency Update: Addressed CVE-2024-29415 by updating theip
dependency to version 2.0.1. This improves the application's security. π -
Host Fiber Flavor Change Error: Added an error for when a hoistable component goes from an instance to a resource, specifically for
<link>
elements. This ensures smoother transitions between different types of host components. β οΈ -
Fixed
readTestFilter
Call: Resolved an issue whereyarn snap --watch
was callingreadTestFilter
even when the filter option was not enabled. This fix ensures the command runs smoothly. π οΈ
Chores
- Migrated to
internal-ip
: Upgraded fromip
tointernal-ip
due to security concerns withip
version 2.0.1. This change ensures better security and compatibility. π
That's all for now! Keep coding and stay awesome! ππ¨βπ»π©βπ»
Here's the latest and greatest from our codebase. We've been busy squashing bugs and adding improvements to make everything smoother and more efficient. Check out the highlights below! π
Bugfixes
-
Import correct prod version of jsx-dev-runtime for react-server (#28939)
- Fixed an issue where the incorrect production version of
jsx-dev-runtime
was being imported forreact-server
. Now, the correct version is used based on the environment, ensuring consistency and efficiency in production builds.
- Fixed an issue where the incorrect production version of
-
DevTools: Fix inspecting components with multiple reads of the same Context in React 17 (#28974)
- Addressed a bug in DevTools where inspecting components with multiple reads of the same Context in React 17 wasn't working properly. Now, the context dependencies are handled correctly, and the values are accurately displayed in DevTools.
-
fix: add
react-server
condition forreact/jsx-dev-runtime
(#28921)- Added a
react-server
condition forreact/jsx-dev-runtime
. This involved updating thepackage.json
andbundles.js
scripts to include the necessary files and configurations for thereact-server
condition.
- Added a
Improvements
-
Update
compiled-rn
destination paths tovendor/react
(#28989)- Updated the destination paths in fbsource from
vendor/*
tovendor/react/*
. This change streamlines the file structure, making it more organized and consistent within the repository. π
- Updated the destination paths in fbsource from
-
Use undici polyfill for tests in old Node versions (#28887)
- Introduced the
undici
polyfill library for testing FormData/File dependent features in older Node.js versions. This update ensures that our tests are more reliable and compatible with older Node.js versions.
- Introduced the
-
Move useMemoCache hook to react/compiler-runtime (#28954)
- Moved the
useMemoCache
hook toreact/compiler-runtime
for Meta-internal purposes. This reorganization helps keep the export onreact
itself to reduce churn while ensuring proper access to the hook across the codebase.
- Moved the
Stay tuned for more updates, and happy coding! π
Here's a detailed breakdown of the recent changes and improvements. We've been busy making things smoother, faster, and more awesome! π
New Features
-
Async Dispatcher for Current Owner and Cache: We've moved the current owner and cache to an Async Dispatcher in React. This significant change ensures better handling and synchronization, reducing the risk of lost updates. Various files were updated to implement this, including ReactSharedInternals and ReactFiberCurrentOwner.
-
Support for (Async) Generator Server Components: React now supports rendering (Async) Generator Server Components. This allows the use of generator functions in Server Components, making it easier and more efficient to handle async operations.
-
React 19 Issue Template: A new issue template for React 19 beta has been added. This template will streamline the process of reporting issues, ensuring that all necessary information is provided for quick resolution.
-
Changelog for Version 18.3.1: Added a detailed changelog for version 18.3.1, highlighting specific changes like the export of
act
fromreact
.
Improvements
-
Ref Cleanup Function for Imperative Handle Refs: Introduced support for a ref cleanup function for imperative handle refs. This enhancement allows developers to define cleanup functions for these refs, ensuring proper handling during updates and unmounting.
-
Update Canary Channel Label to "Beta": During the beta period, canaries will be published and tagged as
beta
when released to npm. This ensures clear versioning and labeling during the beta phase.
Bugfixes
-
Remove Automatic Fetch
Cache
Instrumentation: Removed the automatic patching of the globalfetch
function in Server Components environments. This decision was made to avoid controversy and objections from some RSC framework maintainers. -
Remove Warning for Ref Cleanup Function: Cleaned up the warning related to the cleanup function for refs in React. This warning has been active since version 18.0.0 and is now removed for version 19.
-
Unrevert "Support Writing to this.refs from Userspace": Reverted a previous change to support writing to
this.refs
from userspace again. The regression cause was identified and addressed, allowing this feature to be re-implemented.
Chore
- Cleanup of
replayFailedUnitOfWorkWithInvokeGuardedCallback
andenableProfilerNestedUpdateScheduledHook
: Streamlined the code by removing unnecessary flags, ensuring the codebase is clean and focused on essential features.
We hope you enjoy these updates and improvements! Keep coding and stay awesome! πβ¨
Hey there, awesome devs! We've got some exciting updates and fixes to share with you. Here's the latest and greatest from our changelog:
New feature: React DevTools 5.0.2 -> 5.1.0 π
We've upgraded React DevTools with a bunch of cool new features and improvements! Some highlights include:
- Support for a theme option in devtools-fusebox.
- Added a method for connecting the backend with a custom messaging protocol.
- Source maps for content scripts.
- Displaying the actual pending state when inspecting
useTransition
. - And much more!
Bugfix: Improved <style>
textContent escaping in Fizz π οΈ
We've fixed an issue where style text content was being escaped as HTML, which was a bit of a mess. Now, style text content is properly escaped to prevent early tag closure. This is done by encoding "s" and "S" as hexadecimal unicode representations within sequences like </style>
. No more dangerouslySetInnerHTML shenanigans!
Bugfix: <script>
textContent escaping similar to bootstrapScript π‘οΈ
Inline script children are now properly escaped to avoid breaking script parsing. This update extends the escaping functionality used for bootstrapScripts and importMaps to any inline script. We escape 's' or 'S' with the appropriate unicode code point if found within a <script>
or </script>
sequence. This ensures minimal escaping for readability while maintaining full JS parsing capabilities.
Improvement: CircleCI workflows converted to GitHub Actions π
We've moved our devtools_regression_tests workflow from CircleCI to GitHub Actions. This change makes our CI process more integrated with GitHub, and we've tested it thoroughly in a forked repo to ensure everything runs smoothly.
Improvement: Promoted ASYNC_ITERATOR symbol to React Symbols π
The ASYNC_ITERATOR symbol is now part of React Symbols, making it easier to refer to in multiple places within the codebase. This change streamlines the usage of ASYNC_ITERATOR and ensures consistency across the board.
Improvement: Added support for useFormStatus
in DevTools π§©
DevTools now supports the useFormStatus
hook! We've added a new function useHostTransitionStatus
and updated the Dispatcher
object. This enhancement improves debugging capabilities by providing support for the useFormStatus
hook and adding tests to ensure its correct functionality.
Bugfix: Removed renderToStaticNodeStream
π«
We've removed the renderToStaticNodeStream
method from React. You can now replicate its semantics using renderToPipeableStream
with onAllReady
or renderToReadableStream
with await stream.allready
. This change simplifies the codebase and aligns with our modern streaming implementation for SSR.
Chore: Removed ReactFlightFB bundles π§Ή
We've cleaned up the project by removing the ReactFlightFB bundles. This change simplifies the project structure and eliminates unnecessary code related to these specific bundles, making the codebase more focused and easier to maintain.
That's all for now! Keep coding, stay awesome, and enjoy these updates! πβ¨
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! β¨