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: d6cb4e771341ff82489c00f4907990cb8a75696b
Choose a base ref
...
head repository: facebook/react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 473522093d3dd95582729d01cd5c0d15dcc9cd3b
Choose a head ref
  • 2 commits
  • 24 files changed
  • 2 contributors

Commits on Sep 12, 2024

  1. refactor[react-devtools]: initialize renderer interface early (#30946)

    The current state is that `rendererInterface`, which contains all the
    backend logic, like generating component stack or attaching errors to
    fibers, or traversing the Fiber tree, ..., is only mounted after the
    Frontend is created.
    
    For browser extension, this means that we don't patch console or track
    errors and warnings before Chrome DevTools is opened.
    
    With these changes, `rendererInterface` is created right after
    `renderer` is injected from React via global hook object (e. g.
    `__REACT_DEVTOOLS_GLOBAL_HOOK__.inject(...)`.
    
    Because of the current implementation, in case of multiple Reacts on the
    page, all of them will patch the console independently. This will be
    fixed in one of the next PRs, where I am moving console patching to the
    global Hook.
    
    This change of course makes `hook.js` script bigger, but I think it is a
    reasonable trade-off for better DevX. We later can add more heuristics
    to optimize the performance (if necessary) of `rendererInterface` for
    cases when Frontend was connected late and Backend is attempting to
    flush out too many recorded operations.
    
    This essentially reverts #26563.
    hoxyq authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    bb6b86e View commit details
    Browse the repository at this point in the history
  2. [Fizz] Add resumeAndPrerender to Static Rendering (#30950)

    This is only in the same experimental exports as `resume`. Useful with
    Postpone/Halt.
    
    We already have `prerender()` to create a partial tree with postponed
    state. We also have `resume()` to dynamically resume such a tree.
    
    This lets you do a new prerender by resuming an already existing
    postponed state. Basically creating a chain of preludes. The next
    prelude would include the scripts to patch up the document.
    
    This mostly just works since both prerender and resume are already
    implemented using the same code so we just enable both at the root. I'm
    sure we'll find some edge cases since this wasn't considered when it was
    first written but so far I've only found an unrelated existing bug with
    `keyPath` fixed here.
    sebmarkbage authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    4735220 View commit details
    Browse the repository at this point in the history
Loading