Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v19.1.0
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v19.1.1
Choose a head ref
  • 11 commits
  • 40 files changed
  • 7 contributors

Commits on Jul 15, 2025

  1. Ship enableFabricCompleteRootInCommitPhase (#33064)

    This was shipped internally. Cleaning up the flag.
    jackpope committed Jul 15, 2025
    Configuration menu
    Copy the full SHA
    a24654e View commit details
    Browse the repository at this point in the history
  2. Add eager alternate.stateNode cleanup (#33161)

    This is a fix for a problem where React retains shadow nodes longer than
    it needs to. The behaviour is shown in React Native test:
    https://github.com/facebook/react-native/blob/main/packages/react-native/src/private/__tests__/utilities/__tests__/ShadowNodeReferenceCounter-itest.js#L169
    
    When React commits a new shadow tree, old shadow nodes are stored inside
    `fiber.alternate.stateNode`. This is not cleared up until React clones
    the node again. This may be problematic if mutation deletes a subtree,
    in that case `fiber.alternate.stateNode` will retain entire subtree
    until next update. In case of image nodes, this means retaining entire
    images.
    
    So when React goes from revision A: `<View><View /></View>` to revision
    B: `<View />`, `fiber.alternate.stateNode` will be pointing to Shadow
    Node that represents revision A..
    
    ![image](https://github.com/user-attachments/assets/076b677e-d152-4763-8c9d-4f923212b424)
    
    To fix this, this PR adds a new feature flag
    `enableEagerAlternateStateNodeCleanup`. When enabled,
    `alternate.stateNode` is proactively pointed towards finishedWork's
    stateNode, releasing resources sooner.
    
    I have verified this fixes the issue [demonstrated by React Native
    tests](https://github.com/facebook/react-native/blob/main/packages/react-native/src/private/__tests__/utilities/__tests__/ShadowNodeReferenceCounter-itest.js#L169).
    All existing React tests pass when the flag is enabled.
    sammy-SC authored and jackpope committed Jul 15, 2025
    Configuration menu
    Copy the full SHA
    2cd3c42 View commit details
    Browse the repository at this point in the history
  3. Enable the enableEagerAlternateStateNodeCleanup Feature Flag (#33447)

    Enables the `enableEagerAlternateStateNodeCleanup` feature flag for all
    variants, while maintaining the `__VARIANT__` for the internal React
    Native flavor for backtesting reasons.
    
    ```
    $ yarn test
    ```
    yungsters authored and jackpope committed Jul 15, 2025
    Configuration menu
    Copy the full SHA
    0e6781a View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2025

  1. [DevTools] Get source location from structured callsites in prepareSt…

    …ackTrace (#33143)
    
    When we get the source location for "View source for this element" we
    should be using the enclosing function of the callsite of the child. So
    that we don't just point to some random line within the component.
    
    This is similar to the technique in #33136.
    
    This technique is now really better than the fake throw technique, when
    available. So I now favor the owner technique. The only problem it's
    only available in DEV and only if it has a child that's owned (and not
    filtered).
    
    We could implement this same technique for the error that's thrown in
    the fake throwing solution. However, we really shouldn't need that at
    all because for client components we should be able to call
    `inspect(fn)` at least in Chrome which is even better.
    sebmarkbage authored and jackpope committed Jul 16, 2025
    Configuration menu
    Copy the full SHA
    01eae20 View commit details
    Browse the repository at this point in the history
  2. fix: rename bottom stack frame (#33680)

    `react-stack-bottom-frame` -> `react_stack_bottom_frame`.
    
    This survives `@babel/plugin-transform-function-name`, but now frames
    will be displayed as `at Object.react_stack_bottom_frame (...)` in V8.
    Checks that were relying on exact function name match were updated to
    use either `.indexOf()` or `.includes()`
    
    For backwards compatibility, both React DevTools and Flight Client will
    look for both options. I am not so sure about the latter and if React
    version is locked.
    hoxyq authored and jackpope committed Jul 16, 2025
    Configuration menu
    Copy the full SHA
    5a1eb6f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    73e4ba4 View commit details
    Browse the repository at this point in the history
  4. Bump next prerelease version numbers (#32782)

    Updates the version numbers in the prerelease channels.
    poteto authored and jackpope committed Jul 16, 2025
    Configuration menu
    Copy the full SHA
    b793948 View commit details
    Browse the repository at this point in the history
  5. [eprh] Bump stable version (#32978)

    https://www.npmjs.com/package/eslint-plugin-react-hooks/v/6.0.0 was just
    released, so we can bump this now.
    poteto authored and jackpope committed Jul 16, 2025
    Configuration menu
    Copy the full SHA
    52cf381 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    87e33ca View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2025

  1. Configuration menu
    Copy the full SHA
    3f178f5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    02ef495 View commit details
    Browse the repository at this point in the history
Loading