This project is mirrored from https://github.com/facebook/react.git.
Pull mirroring updated .
- Apr 24, 2025
-
-
Lauren Tan authored
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
-
- Apr 23, 2025
-
-
Lauren Tan authored
todo
-
Lauren Tan authored
This was missed earlier
-
Hendrik Liebau authored
-
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.
-
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.
-
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.
-
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.
-
Hendrik Liebau authored
This allows us to test Flight changes in a codesandbox. [Example](https://codesandbox.io/p/devbox/zkjk7y)
-
- Apr 22, 2025
-
-
lauren authored
No need to append these for non experimental/beta releases.
-
lauren authored
to no one's surprise, the `number` type appears to be cursed in GH actions for workflow dispatch. switch to string
-
lauren authored
Add ability to specify an optional tagVersion which is appended to the version name + tag, eg 19.1.0-rc.1 --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32979). * __->__ #32979 * #32978
-
lauren authored
https://www.npmjs.com/package/eslint-plugin-react-hooks/v/6.0.0 was just released, so we can bump this now.
-
lauren authored
No longer needed.
-
- Apr 18, 2025
-
-
Sebastian "Sebbie" Silbermann authored
-
lauren authored
Adds missing tag.
-
lauren authored
Not every bailout will contain a loc (could be synthetic)
-
Jordan Brown authored
Summary: We landed on not including fire functions in dep arrays. They aren't needed because all values returned from the useFire hook call will read from the same ref. The linter will error if you include a fired function in an explicit dep array. Test Plan: yarn snap --watch --
-
- Apr 17, 2025
-
-
lauren authored
No reason to label it every update, only do it once when it's first opened. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32936). * __->__ #32936 * #32935
-
lauren authored
I can see the value being output and set correctly but not sure why it's skipping the 2nd job. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32935). * #32936 * __->__ #32935
-
lauren authored
v2 --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32932). * __->__ #32932 * #32931 * #32930 * #32929 * #32928
-
lauren authored
Use the correct loc line numbers and not [Object:object] --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32931). * #32932 * __->__ #32931 * #32930 * #32929 * #32928
-
lauren authored
Adds some new options to request the HIR, ReactiveFunction passes --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32930). * #32932 * #32931 * __->__ #32930 * #32929 * #32928
-
lauren authored
Previously the resource would return a bunch of dupes because the algolia results would return multiple hashes (headings) for the same url. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32929). * #32932 * #32931 * #32930 * __->__ #32929 * #32928
-
lauren authored
Uses https://github.com/modelcontextprotocol/inspector to inspect and debug the mcp server. `yarn workspace react-mcp-server dev` will build the server in watch mode and launch the inspector. Default address is http://127.0.0.1:6274. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32928). * #32932 * #32931 * #32930 * #32929 * __->__ #32928
-
lauren authored
-
lauren authored
the joy of yml
-
- Apr 16, 2025
-
-
Sebastian Markbåge authored
I found a bug even before the Activity hydration stuff. If we're hydrating an Offscreen boundary in its "hidden" state it won't have any content to hydrate so will trigger hydration errors (which are then eaten by the Offscreen boundary itself). Leaving it not prewarmed. This doesn't happen in the simple case because we'd be hydrating at a higher priority than Offscreen at the root, and those are deferred to Offscreen by not having higher priority. However, we've hydrating at the Offscreen priority, which we do inside Suspense boundaries, then it tries to hydrate against an empty set. I ended up moving this to the Activity boundary in a future PR since it's the SSR side that decided where to not render something and it only has a concept of Activity, no Offscreen. https://github.com/facebook/react/pull/32863/commits/1dc05a5e2222e18fc3a2062ee1bd957109e21344#diff-d5166797ebbc5b646a49e6a06a049330ca617985d7a6edf3ad1641b43fde1ddfR1111
-
Sebastian Markbåge authored
Since `hidden` is a prop on arbitrary DOM elements it's a common mistake to think that it would also work that way on `<Activity>` but it doesn't. In fact, we even had this mistakes in our own tests. Maybe there's an argument that we should actually just support it but we also have more modes planned. So this adds a warning. It should also already be covered by TypeScript.
-
lauren authored
There's really no need to even run the workflow for non-members or collaborators for the labeling and discord notification workflows. We can exit early.
-
lauren authored
Routine update. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32917). * #32918 * __->__ #32917
-
- Apr 15, 2025
-
-
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
-
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
-
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.
-
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
-
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
-
- Apr 12, 2025
-
-
Jordan Eldredge authored
It used to be that in `__DEV__` we wrapped this `renderWithHooks`, `checkDidRenderIdHook` pair in calls to `setIsRendering()`. However, that dev-only bookkeeping was removed in https://github.com/facebook/react/pull/29206 leaving this redundant check which runs identical code in dev and in prod. ## Test Plan * Manually confirm both cases are the same * GitHub CI tests
-
- Apr 11, 2025
-
-
Sebastian Markbåge authored
We use the Update flag to track if a View Transition had any mutations or relayout. Unlike the other usage of it, this is just temporary state during the commit phase. Normally the flags gets used in the render phase and we reset it when we rerender but in the case of "nested" updates, those trees didn't update. We're only looking for relayouts. So we need to manually reset it before we start using it. We probably shouldn't abuse the Update flag for this and instead use something like temporary state on ViewTransitionState.
-
Sebastian Markbåge authored
Assertively claim a SuspenseInstance. We already know we're hydrating. If there's no match, it throws anyway. So there's no other code path.
-
Sebastian Markbåge authored
This lets us write them early in the render phase. This should be safe because even if we write them deeply, then they still can't be wrapped by a element because then they'd no longer be in the document scope anymore. They end up flat in the body and so when we search the content we'll discover them.
-