KEMBAR78
Comparing b0c1dc01...df38ac9a · facebook/react · GitHub
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: b0c1dc01
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: df38ac9a
Choose a head ref
  • 7 commits
  • 30 files changed
  • 6 contributors

Commits on Sep 25, 2025

  1. [playground] Fix useEffect on tabify (#34594)

    There was a bug in the Compiler Playground related to the "Show
    Internals" toggle due to a useEffect that was causing the tab names to
    flicker from a rerender. Rewritten instead with a `<Suspense>` boundary
    + `use`.
    EugeneChoi4 authored Sep 25, 2025
    Configuration menu
    Copy the full SHA
    250f1b2 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2025

  1. [Flight] Preload <img> and <link> using hints before they're rendered (

    …#34604)
    
    In Fizz and Fiber we emit hints for suspensey images and CSS as soon as
    we discover them during render. At the beginning of the stream. This
    adds a similar capability when a Host Component is known to be a Host
    Component during the Flight render.
    
    The client doesn't know that these resources are in the payload until it
    parses that particular component which is lazy. So they need to be
    hoisted with hints. We detect when these are rendered during Flight and
    add them as hints. That allows you to consume a Flight payload to
    preload prefetched content without having to render it.
    
    `<link rel="preload">` can be hoisted more or less as is.
    
    `<link rel="stylesheet">` we preload but we don't actually insert them
    anywhere until they're rendered. We do these even for non-suspensey
    stylesheets since we know that when they're rendered they're going to
    start loading even if they're not immediately used. They're never lazy.
    
    `<img src>` we only preload if they follow the suspensey image pattern
    since otherwise they may be more lazy e.g. by if they're in the
    viewport. We also skip if they're known to be inside `<picture>`. Same
    as Fizz. Ideally this would preload the other `<source>` but it's
    tricky.
    
    The downside of this is that you might conditionally render something in
    only one branch given a client component. However, in that case you're
    already eagerly fetching the server component's data in that branch so
    it's not too much of a stretch that you want to eagerly fetch the
    corresponding resources as well. If you wanted it to be lazy, you
    should've done a lazy fetch of the RSC.
    
    We don't collect hints when any of these are wrapped in a Client
    Component. In those cases you might want to add your own preload to a
    wrapper Shared Component.
    
    Everything is skipped if it's known to be inside `<noscript>`.
    
    Note that the format context is approximate (see #34601) so it's
    possible for these hints to overfetch or underfetch if you try to trick
    it. E.g. by rendering Server Components inside a Client Component that
    renders `<noscript>`.
    
    ---------
    
    Co-authored-by: Josh Story <josh.c.story@gmail.com>
    sebmarkbage and gnoff authored Sep 26, 2025
    Configuration menu
    Copy the full SHA
    047715c View commit details
    Browse the repository at this point in the history
  2. [DevTools] Disable the tree list for now (#34606)

    When there are no named Activities we should hide the tree side panel
    (and the button to show it). Since it's not implemented yet there are
    never any ones so it's always hidden.
    sebmarkbage authored Sep 26, 2025
    Configuration menu
    Copy the full SHA
    1fd291d View commit details
    Browse the repository at this point in the history
  3. [DevTools] Track Server Environment Names of Each SuspenseNode (#34605)

    Tracks the environment names of the I/O in each SuspenseNode and sent it
    to the front end when the suspenders change.
    
    In the front end, every child boundary should really be treated as it
    has all environment names of the parents too since they're blocked by
    the parent too. We could do this tracking on backend but if there's ever
    one added on the root would need to be send for every child.
    
    This lets us highlight which subtrees are blocked by content on the
    server.
    
    ---------
    
    Co-authored-by: Sebastian "Sebbie" Silbermann <silbermann.sebastian@gmail.com>
    sebmarkbage and eps1lon authored Sep 26, 2025
    Configuration menu
    Copy the full SHA
    6a51a9f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8d557a6 View commit details
    Browse the repository at this point in the history
  5. Bump useEffectEvent to Canary (#34610)

    Bumps `useEffectEvent` from `@experimental` to `@canary`. Removes the
    `experimental_` prefix from the export.
    
    ## TODO
    - [ ] Update useEffectEvent reference page and Canary badging in docs:
    reactjs/react.dev#8025
    jackpope authored Sep 26, 2025
    Configuration menu
    Copy the full SHA
    8bb7241 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    df38ac9 View commit details
    Browse the repository at this point in the history
Loading