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: react/react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 378973b
Choose a base ref
...
head repository: react/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 55480b4
Choose a head ref
  • 8 commits
  • 53 files changed
  • 6 contributors

Commits on Dec 5, 2025

  1. fix[devtools]: no-op unsupported backend bridge events (#35296)

    Follow-up to #34641.
    Similar to #35293,
    #35294.
    
    React DevTools backend can be used in non-DOM environments, so we have
    to feature-check some DOM APIs.
    For now I am just no-oping newly added commands for Native, we should
    revisit this decision once we would roll out Suspense panel there, if
    needed. I am not sure if scrolling will be required as much as it is
    needed on Web.
    
    `isReactNativeEnvironment()` check is kinda clowny, but we've been
    relying on it for quite some time already.
    hoxyq authored Dec 5, 2025
    Configuration menu
    Copy the full SHA
    ad5971f View commit details
    Browse the repository at this point in the history
  2. [compiler] Fix bug w functions depending on hoisted primitives (#35284)

    Fixes an edge case where a function expression would fail to take a
    dependency if it referenced a hoisted `const` inferred as a primitive
    value. We were incorrectly skipping primitve-typed operands when
    determing scopes for merging in InferReactiveScopeVariables.
    
    This was super tricky to debug, for posterity the trick is that Context
    variables (StoreContext etc) are modeled just like a mutable object,
    where assignment to the variable is equivalent to `object.value = ...`
    and reading the variable is equivalent to `object.value` property
    access. Comparing to an equivalent version of the repro case replaced
    with an object and property read/writes showed that everything was
    exactly right, except that InferReactiveScopeVariables wasn't merging
    the scopes of the function and the context variable, which led me right
    to the problematic line.
    
    Closes #35122
    josephsavona authored Dec 5, 2025
    Configuration menu
    Copy the full SHA
    2cb08e6 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2025

  1. Configuration menu
    Copy the full SHA
    c0b7c0d View commit details
    Browse the repository at this point in the history

Commits on Dec 7, 2025

  1. Configuration menu
    Copy the full SHA
    4174533 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    380778d View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2025

  1. [compiler][poc] Reuse ValidateExhaustiveDeps for effect dep validation (

    #35285)
    
    Alternative approach to #35282 for validating effect deps in the
    compiler that builds on the machinery in ValidateExhaustiveDependencies.
    Key changes to that pass:
    
    * Refactor to track the dependencies of array expressions as temporaries
    so we can look them up later if they appear as effect deps.
    * Instead of not storing temporaries for LoadLocals of locally created
    variables, we store the temporary but also propagate the local-ness
    through. This allows us to record deps at the top level, necessary for
    effect deps. Previously the pass was only ever concerned with tracking
    deps within function expressions.
    * Refactor the bulk of the dependency-checking logic from
    `onFinishMemoize()` into a standalone helper to use it for the new
    `onEffect()` helper as well.
    * Add a new ErrorCategory for effect deps, use it for errors on
    effects
    * Put the effect dep validation behind a feature flag
    * Adjust the error reason for effect errors
    
    ---------
    
    Co-authored-by: Jack Pope <jackpope1@gmail.com>
    josephsavona and jackpope authored Dec 8, 2025
    Configuration menu
    Copy the full SHA
    ec9cc00 View commit details
    Browse the repository at this point in the history
  2. [compiler] Add enableVerboseNoSetStateInEffect to suggest options to …

    …user/agent (#35306)
    
    The current `validateNoSetStateInEffects` error has potential false
    positives because
    we cannot fully statically detect patterns where calling setState in an
    effect is
    actually valid. This flag `enableVerboseNoSetStateInEffect` adds a
    verbose error mode that presents multiple possible
    use-cases, allowing an agent to reason about which fix is appropriate
    before acting:
    
    1. Non-local derived data - suggests restructuring state ownership
    2. Derived event pattern - suggests requesting an event callback from
    parent
    3. Force update / external sync - suggests using `useSyncExternalStore`
    
    This gives agents the context needed to make informed decisions rather
    than
    blindly applying a fix that may not be correct for the specific
    situation.
    poteto authored Dec 8, 2025
    Configuration menu
    Copy the full SHA
    3640f38 View commit details
    Browse the repository at this point in the history
  3. [playground] Downgrade Next.js to a secure version (#35317)

    Was bumped to a canary in #34499
    which got never released as stable.
    
    Presumeably to use `Activity` which only made it into Activity in later
    Next.js releases. However, `Activity` never ended up being used due to
    incompatibilities with Monaco Editor. Downgrading should be safe.
    
    Downgrading to fix
    GHSA-9qr9-h5gf-34mp.
    This will allow new deploys since Vercel is currently blocking new
    deploys of unsafe version
    
    ---------
    
    Co-authored-by: Eugene Choi <4eugenechoi@gmail.com>
    eps1lon and EugeneChoi4 authored Dec 8, 2025
    Configuration menu
    Copy the full SHA
    55480b4 View commit details
    Browse the repository at this point in the history
Loading