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: 518d06d2
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 62208bee
Choose a head ref
  • 17 commits
  • 98 files changed
  • 8 contributors

Commits on Dec 20, 2024

  1. Turn off enableYieldingBeforePassive in internal test renderers (#31863)

    #31785 turned on
    `enableYieldingBeforePassive` for the internal test renderer builds. We
    have some failing tests on the RN side blocking the sync so lets turn
    these off for now.
    jackpope authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    de82912 View commit details
    Browse the repository at this point in the history
  2. [compiler] Allow type cast expressions with refs (#31871)

    We report a false positive for the combination of a ref-accessing
    function placed inside an array which is they type-cast. Here we teach
    ref validation about type casts. I also tried other variants like
    `return ref as const` but those already worked.
    
    Closes #31864
    josephsavona authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    6a3d6a4 View commit details
    Browse the repository at this point in the history
  3. [assert helpers] not dom or reconciler (#31862)

    converts everything left outside react-dom and react-reconciler
    rickhanlonii authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    26297f5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    99471c0 View commit details
    Browse the repository at this point in the history
  5. [compiler] transform fire calls (#31796)

    This is the diff with the meaningful changes. The approach is:
    1. Collect fire callees and remove fire() calls, create a new binding
    for the useFire result
    2. Update LoadLocals for captured callees to point to the useFire result
    3. Update function context to reference useFire results
    4. Insert useFire calls after getting to the component scope
    
    This approach aims to minimize the amount of new bindings we introduce
    for the function expressions
    to minimize bookkeeping for dependency arrays. We keep all of the
    LoadLocals leading up to function
    calls as they are and insert new instructions to load the originally
    captured function, call useFire,
    and store the result in a new promoted temporary. The lvalues that
    referenced the original callee are
    changed to point to the new useFire result.
    
    This is the minimal diff to implement the expected behavior (up to
    importing the useFire call, next diff)
    and further stacked diffs implement error handling. The rules for fire
    are:
    1. If you use fire for a callee in the effect once you must use it for
    every time you call it in that effect
    2. You can only use fire in a useEffect lambda/functions defined inside
    the useEffect lambda
    
    There is still more work to do here, like updating the effect dependency
    array and handling object methods
    
    --
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31796).
    * #31811
    * #31798
    * #31797
    * __->__ #31796
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    03297e0 View commit details
    Browse the repository at this point in the history
  6. [compiler] add fire imports (#31797)

    Summary:
    
    Adds import {useFire} from 'react' when fire syntax is used.
    
    This is experimentation and may not become a stable feature in the
    compiler.
    
    --
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31797).
    * #31811
    * #31798
    * __->__ #31797
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    ab27231 View commit details
    Browse the repository at this point in the history
  7. [compile] Error on fire outside of effects and ensure correct compila…

    …tion, correct import (#31798)
    
    Traverse the compiled functions to ensure there are no lingering fires
    and that all
    fire calls are inside an effect lambda.
    
    Also corrects the import to import from the compiler runtime instead
    
    
    --
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    45a720f View commit details
    Browse the repository at this point in the history
  8. [compiler] Rewrite effect dep arrays that use fire (#31811)

    If an effect uses a dep array, also rewrite the dep array to use the
    fire binding
    
    --
    jbrown215 authored Dec 20, 2024
    Configuration menu
    Copy the full SHA
    6907aa2 View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2024

  1. [asserts helpers] react package (#31853)

    Based off #31844
    
    Commit to review:
    11aa104
    
    Converts the rest of the `react` package.
    rickhanlonii authored Dec 23, 2024
    Configuration menu
    Copy the full SHA
    94867f3 View commit details
    Browse the repository at this point in the history
  2. [assert helpers] Remove toWarnDev from fixtures/dom (#31894)

    This is unused and never was:
    e6a0473
    rickhanlonii authored Dec 23, 2024
    Configuration menu
    Copy the full SHA
    97d7949 View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2024

  1. [compiler] Fix broken fire snapshot (#31920)

    This was not committed in #31811
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31920).
    * #31919
    * #31918
    * #31917
    * #31916
    * #31915
    * __->__ #31920
    poteto authored Dec 26, 2024
    Configuration menu
    Copy the full SHA
    fc8a898 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2024

  1. [rcr] Relax react peer dep requirement (#31915)

    There's no real reason to restrict the React peer dep to
    non-experimental, so relax it.
    
    ---
    [//]: # (BEGIN SAPLING FOOTER)
    Stack created with [Sapling](https://sapling-scm.com). Best reviewed
    with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31915).
    * #31919
    * #31918
    * #31917
    * #31916
    * __->__ #31915
    * #31920
    poteto authored Dec 27, 2024
    Configuration menu
    Copy the full SHA
    4309bde View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2024

  1. Add Profiler mode to fixtures even if React DevTools is not installed (

    …#31877)
    
    Currently you need to do one of either:
    
    1. Install React DevTools
    2. Install React Refresh
    3. Add Profiler component
    
    To opt in to component level profiling.
    
    It was a bit confusing that some of the fixtures was doing 2 which made
    them work while other was depending on if you had DevTools.
    
    Really React Refresh shouldn't really opt you in I think.
    sebmarkbage authored Dec 28, 2024
    Configuration menu
    Copy the full SHA
    d4ac768 View commit details
    Browse the repository at this point in the history
  2. [Flight] Mark Errored Server Components (#31879)

    This is similar to #31876 but for Server Components.
    
    It marks them as errored and puts the error message in the Summary
    properties.
    
    <img width="1511" alt="Screenshot 2024-12-20 at 5 05 35 PM"
    src="https://github.com/user-attachments/assets/92f11e42-0e23-41c7-bfd4-09effb25e024"
    />
    
    This only looks at the current chunk for rejections. That means that
    there might still be promises deeper that rejected but it's only the
    immediate return value of the Server Component that's considered a
    rejection of the component itself.
    sebmarkbage authored Dec 28, 2024
    Configuration menu
    Copy the full SHA
    50f00fd View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2024

  1. DevTools: fix Compiler inegration test with 18.2 (#31904)

    Currently failing with `TypeError: Invalid Version: 19`, looks like I've
    overlooked this one in #31241.
    hoxyq authored Dec 29, 2024
    Configuration menu
    Copy the full SHA
    c01b805 View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2024

  1. [Flight Parcel] Implement prepareDestinationForModule (#31799)

    Followup to #31725
    
    This implements `prepareDestinationForModule` in the Parcel Flight
    client. On the Parcel side, the `<Resources>` component now only inserts
    `<link>` elements for stylesheets (along with a bootstrap script when
    needed), and React is responsible for inserting scripts. This ensures
    that components that are conditionally dynamic imported during render
    are also preloaded.
    
    CSS must be added to the RSC tree using `<Resources>` to avoid FOUC.
    This must be manually rendered in both the top-level page, and in any
    component that is dynamic imported. It would be nice if there was a way
    for React to automatically insert CSS as well, but unfortunately
    `prepareDestinationForModule` only knows about client components and not
    CSS for server components. Perhaps there could be a way we could
    annotate components at code splitting boundaries with the resources they
    need? More thoughts in this thread:
    #31725 (comment)
    devongovett authored Dec 31, 2024
    Configuration menu
    Copy the full SHA
    694d3e1 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2025

  1. DevTools: fork FastRefresh test for <18 versions of React (#31893)

    We currently have a failing test for React DevTools against React 17.
    This started failing in #30899,
    where we changed logic for error tracking and started relying on
    `onPostCommitFiberRoot` hook.
    
    Looking at #21183,
    `onPostCommitFiberRoot` was shipped in 18, which means that any console
    errors / warnings emitted in passive effects won't be recorded by React
    DevTools for React < 18.
    hoxyq authored Jan 2, 2025
    Configuration menu
    Copy the full SHA
    62208be View commit details
    Browse the repository at this point in the history
Loading