Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/facebook/react.git. Pull mirroring updated .
  1. Apr 24, 2025
  2. Apr 23, 2025
    • Lauren Tan's avatar
    • Lauren Tan's avatar
      [compiler] Log inferEffectDependencies · b3cea30f
      Lauren Tan authored
      This was missed earlier
      b3cea30f
    • Hendrik Liebau's avatar
    • Sebastian Markbåge's avatar
      Implement Partial Hydration for Activity (#32863) · 3ef31d19
      Sebastian Markbåge authored
      Stacked on #32862 and #32842.
      
      This means that Activity boundaries now act as boundaries which can have
      their effects mounted independently. Just like Suspense boundaries, we
      hydrate the outer content first and then start hydrating the content in
      an Offscreen lane. Flowing props or interacting with the content
      increases the priority just like Suspense boundaries.
      
      This skips emitting even the comments for `<Activity mode="hidden">` so
      we don't hydrate those. Instead those are deferred to a later client
      render.
      
      The implementation are just forked copies of the SuspenseComponent
      branches and then carefully going through each line and tweaking it.
      
      The main interesting bit is that, unlike Suspense, Activity boundaries
      don't have fallbacks so all those branches where you might commit a
      suspended tree disappears. Instead, if something suspends while
      hydration, we can just leave the dehydrated content in place. However,
      if something does suspend during client rendering then it should bubble
      up to the parent. Therefore, we have to be careful to only
      pushSuspenseHandler when hydrating. That's really the main difference.
      
      This just uses the existing basic Activity tests but I've started work
      on port all of the applicable Suspense tests in SelectiveHydration-test
      and PartialHydration-test to Activity versions.
      3ef31d19
    • Sebastian Markbåge's avatar
      Implement ActivityInstance in FiberConfigDOM (#32842) · 17f88c80
      Sebastian Markbåge authored
      Stacked on #32851 and #32900.
      
      This implements the equivalent Configs for ActivityInstance as we have
      for SuspenseInstance. These can be implemented as comments but they
      don't have to be and can be implemented differently in the renderer.
      
      This seems like a lot duplication but it's actually ends mostly just
      calling the same methods underneath and the wrappers compiles out.
      
      This doesn't leave the Activity dehydrated yet. It just hydrates into it
      immediately.
      17f88c80
    • Sebastian Markbåge's avatar
      Set hidden Offscreen to the shellBoundary regardless of previous state (#32844) · 3fbd6b7b
      Sebastian Markbåge authored
      I think this was probably just copy-paste from the Suspense path.
      
      It shouldn't matter what the previous state of an Offscreen boundary
      was. What matters is that it's now hidden and therefore if it suspends,
      we can just leave it as is without the tree becoming inconsistent.
      3fbd6b7b
    • Sebastian Markbåge's avatar
      Hide/unhide the content of dehydrated suspense boundaries if they resuspend (#32900) · ebf7318e
      Sebastian Markbåge authored
      Found this bug while working on Activity. There's a weird edge case when
      a dehydrated Suspense boundary is a direct child of another Suspense
      boundary which is hydrated but then it resuspends without forcing the
      inner one to hydrate/delete.
      
      It used to just leave that in place because hiding/unhiding didn't deal
      with dehydrated fragments.
      
      Not sure this is really worth fixing.
      ebf7318e
    • Hendrik Liebau's avatar
      Build `react-server-dom-webpack` for codesandbox (#32990) · 620c838f
      Hendrik Liebau authored
      This allows us to test Flight changes in a codesandbox.
      
      [Example](https://codesandbox.io/p/devbox/zkjk7y)
      620c838f
  3. Apr 22, 2025
  4. Apr 18, 2025
  5. Apr 17, 2025
  6. Apr 16, 2025
  7. Apr 15, 2025
    • Jorge (Hezi) Cohen's avatar
      [DevTools] Make Toggle hover state more visible (#32914) · 707b3fc6
      Jorge (Hezi) Cohen authored
      This change adds a background color to Toggles to make them easier to
      see. This is especially important when DevTools are not in focus, and
      it's harder to see.
      
      Test plan:
      1. `yarn build:chrome:local`
      2. Inspect components 
      3. Hover over "Select an Element in page to inspect it"
      4. Observe background change
      707b3fc6
    • Piotr Tomczewski's avatar
      [DevTools] feat: show changed hooks names in the Profiler tab (#31398) · 7ff4d057
      Piotr Tomczewski authored
      <!--
        Thanks for submitting a pull request!
      We appreciate you spending the time to work on these changes. Please
      provide enough information so that others can review your pull request.
      The three fields below are mandatory.
      
      Before submitting a pull request, please make sure the following is
      done:
      
      1. Fork [the repository](https://github.com/facebook/react) and create
      your branch from `main`.
        2. Run `yarn` in the repository root.
      3. If you've fixed a bug or added code that should be tested, add tests!
      4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
      TestName` is helpful in development.
      5. Run `yarn test --prod` to test in the production environment. It
      supports the same options as `yarn test`.
      6. If you need a debugger, run `yarn test --debug --watch TestName`,
      open `chrome://inspect`, and press "Inspect".
      7. Format your code with
      [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
      8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
      check changed files.
        9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
        10. If you haven't already, complete the CLA.
      
      Learn more about contributing:
      https://reactjs.org/docs/how-to-contribute.html
      -->
      
      ## Summary
      
      This PR adds support for displaying the names of changed hooks directly
      in the Profiler tab, making it easier to identify specific updates.
      
      A `HookChangeSummary` component has been introduced to show these hook
      names, with a `displayMode` prop that toggles between `“compact”` for
      tooltips and `“detailed”` for more in-depth views. This keeps tooltip
      summaries concise while allowing for a full breakdown where needed.
      
      This functionality also respects the `“Always parse hook names from
      source”` setting from the Component inspector, as it uses the same
      caching mechanism already in place for the Components tab. Additionally,
      even without hook names parsed, the Profiler will now display hook types
      (like `State`, `Callback`, etc.) based on data from `inspectedElement`.
      
      To enable this across the DevTools, `InspectedElementContext` has been
      moved higher in the component tree, allowing it to be shared between the
      Profiler and Components tabs. This update allows hook name data to be
      reused across tabs without duplication.
      
      Additionally, a `getAlreadyLoadedHookNames` helper function was added to
      efficiently access cached hook names, reducing the need for repeated
      fetching when displaying changes.
      
      These changes improve the ability to track specific hook updates within
      the Profiler tab, making it clearer to see what’s changed.
      
      ### Before
      Previously, the Profiler tab displayed only the IDs of changed hooks, as
      shown below:
      <img width="350" alt="Screenshot 2024-11-01 at 12 02 21_cropped"
      src="https://github.com/user-attachments/assets/7a5f5f67-f1c8-4261-9ba3-1c76c9a88af3">
      
      ### After (without hook names parsed)
      When hook names aren’t parsed, custom hooks and hook types are displayed
      based on the inspectedElement data:
      <img width="350" alt="Screenshot 2024-11-01 at 12 03 09_cropped"
      src="https://github.com/user-attachments/assets/ed857a6d-e6ef-4e5b-982c-bf30c2d8a7e2">
      
      ### After (with hook names parsed)
      Once hook names are fully parsed, the Profiler tab provides a complete
      breakdown of specific hooks that have changed:
      <img width="350" alt="Screenshot 2024-11-01 at 12 03 14_cropped"
      src="https://github.com/user-attachments/assets/1ddfcc35-7474-4f4d-a084-f4e9f993a5bf">
      
      This should resolve #21856 :tada:
      7ff4d057
    • lauren's avatar
      [compiler] Init react-mcp-server (#32859) · 08075929
      lauren authored
      Just trying this out as a small hack for fun. Nothing serious is
      planned.
      
      Inits an MCP server that has 1 assistant prompt and two capabilities.
      08075929
    • lauren's avatar
      [compiler] Update rimraf (#32868) · 4eea4fcf
      lauren authored
      Just updating the compiler workspace package.
      ---
      [//]: # (BEGIN SAPLING FOOTER)
      Stack created with [Sapling](https://sapling-scm.com). Best reviewed
      with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32868).
      * #32859
      * __->__ #32868
      4eea4fcf
    • lauren's avatar
      Upgrade node.js to 20 LTS (#32855) · 58e9a4b7
      lauren authored
      Try to upgrade our node version.
      ---
      [//]: # (BEGIN SAPLING FOOTER)
      Stack created with [Sapling](https://sapling-scm.com). Best reviewed
      with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32855).
      * #32861
      * #32860
      * #32859
      * __->__ #32855
      58e9a4b7
  8. Apr 12, 2025
  9. Apr 11, 2025