-
Notifications
You must be signed in to change notification settings - Fork 50.7k
Comparing changes
Open a pull request
base repository: facebook/react
base: 7283a213
head repository: facebook/react
compare: 79ddf5b5
- 10 commits
- 53 files changed
- 6 contributors
Commits on Dec 9, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 226b859 - Browse repository at this point
Copy the full SHA 226b859View commit details -
Configuration menu - View commit details
-
Copy full SHA for 76d603a - Browse repository at this point
Copy the full SHA 76d603aView commit details -
[Flight] Extract special cases for Server Component return value posi…
…tion (#31713) This is just moving some code into a helper. We have a bunch of special cases for the return value slot of a Server Component that's different from just rendering that inside an object. This was getting a little tricky to reason about inline with the rest of rendering.
Configuration menu - View commit details
-
Copy full SHA for 3d2ab01 - Browse repository at this point
Copy the full SHA 3d2ab01View commit details
Commits on Dec 10, 2024
-
Update ReactDebugInfo types to declare timing info separately (#31714)
This clarifies a few things by ensuring that there is always at least one required field. This can be used to refine the object to one of the specific types. However, it's probably just a matter of time until we make this tagged unions instead. E.g. it would be nice to rename the `name` field `ReactComponentInfo` to `type` and tag it with the React Element symbol because then it's just the same as a React Element. I also extract a time field. The idea is that this will advance (or rewind) the time to the new timestamp and then anything below would be defined as happening within that time stamp. E.g. to model the start and end for a server component you'd do something like: ``` [ {time: 123}, {name: 'Component', ... }, {time: 124}, ] ``` The reason this needs to be in the `ReactDebugInfo` is so that timing information from one environment gets transferred into the next environment. It lets you take a Promise from one world and transfer it into another world and its timing information is preserved without everything else being preserved. I've gone back and forth on if this should be part of each other Info object like `ReactComponentInfo` but since those can be deduped and can change formats (e.g. this should really just be a React Element) it's better to store this separately. The time format is relative to a `timeOrigin` which is the current environment's `timeOrigin`. When it's serialized between environments this needs to be considered. Emitting these timings is not yet implemented in this PR. --------- Co-authored-by: eps1lon <sebastian.silbermann@vercel.com>Configuration menu - View commit details
-
Copy full SHA for 372ec00 - Browse repository at this point
Copy the full SHA 372ec00View commit details -
Clean up findFiberByHostInstance from DevTools Hook (#31711)
The need for this was removed in #30831 Since the new DevTools version has been released for a while and we expect people to more or less auto-update. Future versions of React don't need this. Once we remove the remaining uses of `getInstanceFromNode` e.g. in the deprecated internal `findDOMNode`/`findNodeHandle` and the event system, we can completely remove the tagging of DOM nodes.
Configuration menu - View commit details
-
Copy full SHA for 3b597c0 - Browse repository at this point
Copy the full SHA 3b597c0View commit details -
[Flight] Don't call onError/onPostpone when halting and unify error b…
…ranches (#31715) We shouldn't call onError/onPostpone when we halt a stream because that node didn't error yet. Its digest would also get lost. We also have a lot of error branches now for thenables and streams. This unifies them under erroredTask. I'm not yet unifying the cases that don't allocate a task for the error when those are outlined.
Configuration menu - View commit details
-
Copy full SHA for 4a8fc0f - Browse repository at this point
Copy the full SHA 4a8fc0fView commit details -
[Flight] rename
prerendertounstable_prerenderand include in s……table channel (#31724) We added an experimental `prerender` API to flight. This change exposes this API in stable channels prefixed as `unstable_prerender`. We have high confidence this API should exist but because we have not yet settled on how to handle resuming/replaying of RSC streams we may need to change the API contract to suit future needs. This release will allow us to get more usage out of the existing implemented functionality without requiring you to use experimental builds which will open up greater adoption and opportunity for feedback. the `prerender` implementation is documented in the `react-server` package. As with all RSC APIs implemented in bundler specific binding packages these aren't intended to be called by end users but instead be used by frameworks implementing React Server Components. Previously `prerender` was exposed unprefixed and only in the experimental channel. This PR renames the export across all channels to `unstable_prerender` so users of this previously unprefixed api will need to update to the unstable form. This isn't a breaking change because it was only exposed in the experimental channel which does not follow semver. The reason we don't expose it under both names is that users may feature detect the unprefixed form and then when we finally do ship it as unprefixed we may change the function signature and break this code. Changing the name now is much safer.
Configuration menu - View commit details
-
Copy full SHA for 7cb356e - Browse repository at this point
Copy the full SHA 7cb356eView commit details -
[compiler] Fix dropped ref with spread props in InlineJsxTransform (#…
…31726) When supporting ref as prop in #31558, I missed fixing the optimization to pass a spread-props-only props object in without an additional object copy. In the case that we have only a ref along with a spread, we cannot return only the spread object. This results in dropping the ref. In this example ```javascript <Foo ref={ref} {...props} /> ``` The bugged output is: ```javascript { // ... props: props } ``` With this change we now get the correct output: ```javascript { // ... props: {ref: ref, ...props} } ```
Configuration menu - View commit details
-
Copy full SHA for 16367ce - Browse repository at this point
Copy the full SHA 16367ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c4a7c9 - Browse repository at this point
Copy the full SHA 7c4a7c9View commit details
Commits on Dec 11, 2024
-
[Flight] Track Timing Information (#31716)
Stacked on #31715. This adds profiling data for Server Components to the RSC stream (but doesn't yet use it for anything). This is on behind `enableProfilerTimer` which is on for Dev and Profiling builds. However, for now there's no Profiling build of Flight so in practice only in DEV. It's gated on `enableComponentPerformanceTrack` which is experimental only for now. We first emit a timeOrigin in the beginning of the stream. This provides us a relative time to emit timestamps against for cross environment transfer so that we can log it in terms of absolute times. Using this as a separate field allows the actual relative timestamps to be a bit more compact representation and preserves floating point precision. We emit a timestamp before emitting a Server Component which represents the start time of the Server Component. The end time is either when the next Server Component starts or when we finish the task. We omit the end time for simple tasks that are outlined without Server Components. By encoding this as part of the debugInfo stream, this information can be forwarded between Server to Server RSC.
Configuration menu - View commit details
-
Copy full SHA for 79ddf5b - Browse repository at this point
Copy the full SHA 79ddf5bView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 7283a213...79ddf5b5