GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Flight] Instrument the Console in the RSC Environment and Replay Logs on the Client by sebmarkbage · Pull Request #28384 · react/react

Conversation

@sebmarkbage

@sebmarkbage sebmarkbage commented Feb 20, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

When developing in an RSC environment, you should be able to work in a single environment as if it was a unified environment. With thrown errors we already serialize them and then rethrow them on the client.

Since by default we log them via onError both in Flight and Fizz, you can get the same log in the RSC runtime, the SSR runtime and on the client.

With console logs made in SSR renders, you typically replay the same code during hydration on the client. So for example warnings already show up both in the SSR logs and on the client (although not guaranteed to be the same). You could just spend your time in the client and you'd be fine.

Previously, RSC logs would not be replayed because they don't hydrate. So it's easy to miss warnings for example.

With this approach, we replay RSC logs both during SSR so they end up in the SSR logs and on the client. That way you can just stay in the browser window during normal development cycles. You shouldn't have to care if your component is a server or client component when working on logical things or iterating on a product.

With this change, you probably should mostly ignore the Flight log stream and just look at the client or maybe the SSR one. Unless you're digging into something specific. In particular if you just naively run both Flight and Fizz in the same terminal you get duplicates. I like to run out fixtures yarn dev:region and yarn dev:global in two separate terminals.

Console logs may contain complex objects which can be inspected. Ideally a DevTools inspector could reach into the RSC server and remotely inspect objects using the remote inspection protocol. That way complex objects can be loaded on demand as you expand into them. However, that is a complex environment to set up and the server might not even be alive anymore by the time you inspect the objects. Therefore, I do a best effort to serialize the objects using the RSC protocol but limit the depth that can be rendered.

This feature is only own in dev mode since it can be expensive.

In a follow up, I'll give the logs a special styling treatment to clearly differentiate them from logs coming from the client. As well as deal with stacks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eps1lon, hamlim, and rickhanlonii reacted with hooray emoji
All reactions
  • 🎉 3 reactions
@sebmarkbage
sebmarkbage requested review from acdlite and gnoff February 20, 2024 03:15
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 20, 2024
@react-sizebot

react-sizebot commented Feb 20, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Comparing: 8f01226...609cb19

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.87 kB 176.87 kB = 55.14 kB 55.14 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 178.97 kB 178.97 kB = 55.77 kB 55.77 kB
facebook-www/ReactDOM-prod.classic.js = 591.94 kB 591.94 kB = 104.47 kB 104.47 kB
facebook-www/ReactDOM-prod.modern.js = 575.23 kB 575.23 kB = 101.48 kB 101.48 kB
oss-experimental/react-server/cjs/react-server-flight.development.js +13.62% 81.25 kB 92.32 kB +9.66% 19.10 kB 20.95 kB
facebook-www/ReactFlightDOMServer-dev.modern.js +11.38% 89.72 kB 99.93 kB +8.77% 19.09 kB 20.77 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +9.62% 116.43 kB 127.63 kB +6.91% 27.19 kB 29.07 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +9.33% 120.62 kB 131.88 kB +6.61% 28.61 kB 30.50 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +9.28% 119.25 kB 130.31 kB +6.30% 28.19 kB 29.97 kB
oss-experimental/react-server-dom-turbopack/umd/react-server-dom-turbopack-server.browser.development.js +9.26% 125.75 kB 137.39 kB +6.83% 28.50 kB 30.44 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +9.18% 122.55 kB 133.81 kB +6.52% 29.11 kB 31.01 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js +9.14% 122.58 kB 133.79 kB +6.64% 28.61 kB 30.51 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +9.09% 121.69 kB 132.76 kB +6.31% 28.86 kB 30.68 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +9.07% 128.32 kB 139.96 kB +6.79% 29.15 kB 31.14 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +8.97% 124.87 kB 136.08 kB +6.60% 29.18 kB 31.10 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +8.95% 125.22 kB 136.43 kB +6.37% 29.45 kB 31.32 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +8.79% 127.51 kB 138.71 kB +6.17% 30.09 kB 31.94 kB
facebook-www/ReactFlightDOMClient-dev.modern.js +3.64% 37.17 kB 38.53 kB +4.52% 8.51 kB 8.90 kB
oss-stable-semver/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +2.38% 54.33 kB 55.62 kB +2.72% 13.07 kB 13.42 kB
oss-stable/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +2.38% 54.33 kB 55.62 kB +2.72% 13.07 kB 13.42 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.development.js +2.37% 54.53 kB 55.82 kB +2.71% 13.13 kB 13.49 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.development.js +2.37% 54.53 kB 55.82 kB +2.71% 13.13 kB 13.49 kB
oss-stable-semver/react-client/cjs/react-client-flight.development.js +2.31% 55.94 kB 57.23 kB +2.67% 13.74 kB 14.10 kB
oss-stable/react-client/cjs/react-client-flight.development.js +2.31% 55.94 kB 57.23 kB +2.67% 13.74 kB 14.10 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +2.23% 57.78 kB 59.07 kB +2.52% 14.11 kB 14.46 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +2.23% 57.78 kB 59.07 kB +2.52% 14.11 kB 14.46 kB
oss-stable-semver/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.development.js +2.22% 61.42 kB 62.78 kB +2.56% 14.32 kB 14.69 kB
oss-stable/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.development.js +2.22% 61.42 kB 62.78 kB +2.56% 14.32 kB 14.69 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +2.21% 58.29 kB 59.58 kB +2.49% 14.28 kB 14.64 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +2.21% 58.29 kB 59.58 kB +2.49% 14.28 kB 14.64 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +2.20% 61.96 kB 63.32 kB +2.53% 14.50 kB 14.87 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +2.20% 61.96 kB 63.32 kB +2.53% 14.50 kB 14.87 kB
oss-experimental/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +2.17% 59.41 kB 60.70 kB +2.68% 14.05 kB 14.43 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.development.js +2.17% 59.61 kB 60.90 kB +2.67% 14.12 kB 14.49 kB
oss-experimental/react-client/cjs/react-client-flight.development.js +2.12% 61.02 kB 62.31 kB +2.48% 14.73 kB 15.10 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +2.07% 62.24 kB 63.53 kB +2.46% 15.03 kB 15.40 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +2.07% 62.24 kB 63.53 kB +2.46% 15.03 kB 15.40 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +2.05% 62.86 kB 64.15 kB +2.49% 15.09 kB 15.46 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +2.04% 63.37 kB 64.66 kB +2.46% 15.26 kB 15.64 kB
oss-experimental/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.development.js +2.04% 66.82 kB 68.18 kB +2.49% 15.33 kB 15.71 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +2.02% 67.36 kB 68.72 kB +2.46% 15.51 kB 15.89 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +2.02% 64.02 kB 65.31 kB +2.39% 15.57 kB 15.94 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +2.02% 64.02 kB 65.31 kB +2.39% 15.57 kB 15.94 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.02% 64.06 kB 65.35 kB +2.37% 15.60 kB 15.97 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.02% 64.06 kB 65.35 kB +2.37% 15.60 kB 15.97 kB
test_utils/ReactAllWarnings.js Deleted 67.04 kB 0.00 kB Deleted 16.43 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-server/cjs/react-server-flight.development.js +13.62% 81.25 kB 92.32 kB +9.66% 19.10 kB 20.95 kB
facebook-www/ReactFlightDOMServer-dev.modern.js +11.38% 89.72 kB 99.93 kB +8.77% 19.09 kB 20.77 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +9.62% 116.43 kB 127.63 kB +6.91% 27.19 kB 29.07 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +9.33% 120.62 kB 131.88 kB +6.61% 28.61 kB 30.50 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +9.28% 119.25 kB 130.31 kB +6.30% 28.19 kB 29.97 kB
oss-experimental/react-server-dom-turbopack/umd/react-server-dom-turbopack-server.browser.development.js +9.26% 125.75 kB 137.39 kB +6.83% 28.50 kB 30.44 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +9.18% 122.55 kB 133.81 kB +6.52% 29.11 kB 31.01 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js +9.14% 122.58 kB 133.79 kB +6.64% 28.61 kB 30.51 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +9.09% 121.69 kB 132.76 kB +6.31% 28.86 kB 30.68 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +9.07% 128.32 kB 139.96 kB +6.79% 29.15 kB 31.14 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +8.97% 124.87 kB 136.08 kB +6.60% 29.18 kB 31.10 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +8.95% 125.22 kB 136.43 kB +6.37% 29.45 kB 31.32 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +8.79% 127.51 kB 138.71 kB +6.17% 30.09 kB 31.94 kB
facebook-www/ReactFlightDOMClient-dev.modern.js +3.64% 37.17 kB 38.53 kB +4.52% 8.51 kB 8.90 kB
oss-stable-semver/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +2.38% 54.33 kB 55.62 kB +2.72% 13.07 kB 13.42 kB
oss-stable/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +2.38% 54.33 kB 55.62 kB +2.72% 13.07 kB 13.42 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.development.js +2.37% 54.53 kB 55.82 kB +2.71% 13.13 kB 13.49 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.development.js +2.37% 54.53 kB 55.82 kB +2.71% 13.13 kB 13.49 kB
oss-stable-semver/react-client/cjs/react-client-flight.development.js +2.31% 55.94 kB 57.23 kB +2.67% 13.74 kB 14.10 kB
oss-stable/react-client/cjs/react-client-flight.development.js +2.31% 55.94 kB 57.23 kB +2.67% 13.74 kB 14.10 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +2.23% 57.78 kB 59.07 kB +2.52% 14.11 kB 14.46 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +2.23% 57.78 kB 59.07 kB +2.52% 14.11 kB 14.46 kB
oss-stable-semver/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.development.js +2.22% 61.42 kB 62.78 kB +2.56% 14.32 kB 14.69 kB
oss-stable/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.development.js +2.22% 61.42 kB 62.78 kB +2.56% 14.32 kB 14.69 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +2.21% 58.29 kB 59.58 kB +2.49% 14.28 kB 14.64 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +2.21% 58.29 kB 59.58 kB +2.49% 14.28 kB 14.64 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +2.20% 61.96 kB 63.32 kB +2.53% 14.50 kB 14.87 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +2.20% 61.96 kB 63.32 kB +2.53% 14.50 kB 14.87 kB
oss-experimental/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +2.17% 59.41 kB 60.70 kB +2.68% 14.05 kB 14.43 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.development.js +2.17% 59.61 kB 60.90 kB +2.67% 14.12 kB 14.49 kB
oss-experimental/react-client/cjs/react-client-flight.development.js +2.12% 61.02 kB 62.31 kB +2.48% 14.73 kB 15.10 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +2.07% 62.24 kB 63.53 kB +2.46% 15.03 kB 15.40 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +2.07% 62.24 kB 63.53 kB +2.46% 15.03 kB 15.40 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.development.js +2.05% 62.86 kB 64.15 kB +2.49% 15.09 kB 15.46 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.development.js +2.04% 63.37 kB 64.66 kB +2.46% 15.26 kB 15.64 kB
oss-experimental/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.development.js +2.04% 66.82 kB 68.18 kB +2.49% 15.33 kB 15.71 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.development.js +2.02% 67.36 kB 68.72 kB +2.46% 15.51 kB 15.89 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +2.02% 64.02 kB 65.31 kB +2.39% 15.57 kB 15.94 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +2.02% 64.02 kB 65.31 kB +2.39% 15.57 kB 15.94 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.02% 64.06 kB 65.35 kB +2.37% 15.60 kB 15.97 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +2.02% 64.06 kB 65.35 kB +2.37% 15.60 kB 15.97 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js +1.97% 65.46 kB 66.75 kB +2.32% 15.96 kB 16.33 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js +1.97% 65.46 kB 66.75 kB +2.32% 15.96 kB 16.33 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +1.97% 65.48 kB 66.77 kB +2.32% 16.00 kB 16.37 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +1.97% 65.48 kB 66.77 kB +2.32% 16.00 kB 16.37 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js +1.95% 66.32 kB 67.61 kB +2.27% 16.16 kB 16.53 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js +1.95% 66.32 kB 67.61 kB +2.27% 16.16 kB 16.53 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +1.95% 66.35 kB 67.64 kB +2.27% 16.20 kB 16.57 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +1.95% 66.35 kB 67.64 kB +2.27% 16.20 kB 16.57 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.node.development.js +1.92% 67.33 kB 68.62 kB +2.36% 16.02 kB 16.40 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.development.js +1.87% 69.11 kB 70.40 kB +2.28% 16.57 kB 16.95 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.development.js +1.87% 69.14 kB 70.43 kB +2.28% 16.59 kB 16.97 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.development.js +1.83% 70.54 kB 71.83 kB +2.23% 16.96 kB 17.33 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.development.js +1.83% 70.57 kB 71.86 kB +2.22% 17.00 kB 17.38 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.development.js +1.81% 71.41 kB 72.70 kB +2.21% 17.16 kB 17.54 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.development.js +1.81% 71.44 kB 72.73 kB +2.22% 17.20 kB 17.58 kB
oss-stable-semver/react-server/cjs/react-server-flight.production.js +0.75% 58.23 kB 58.67 kB +0.36% 14.30 kB 14.35 kB
oss-stable/react-server/cjs/react-server-flight.production.js +0.75% 58.23 kB 58.67 kB +0.36% 14.30 kB 14.35 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +0.65% 95.19 kB 95.81 kB +0.34% 23.05 kB 23.12 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +0.65% 95.19 kB 95.81 kB +0.34% 23.05 kB 23.12 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +0.64% 96.91 kB 97.54 kB +0.34% 23.48 kB 23.56 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +0.64% 96.91 kB 97.54 kB +0.34% 23.48 kB 23.56 kB
oss-experimental/react-server/cjs/react-server-flight.production.js +0.64% 68.16 kB 68.60 kB +0.42% 16.37 kB 16.44 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-server.node.production.js +0.62% 91.72 kB 92.30 kB +0.42% 21.82 kB 21.91 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-server.node.production.js +0.62% 91.72 kB 92.30 kB +0.42% 21.82 kB 21.91 kB
oss-stable-semver/react-server/cjs/react-server-flight.development.js +0.60% 71.30 kB 71.73 kB +0.35% 17.05 kB 17.11 kB
oss-stable/react-server/cjs/react-server-flight.development.js +0.60% 71.30 kB 71.73 kB +0.35% 17.05 kB 17.11 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.js +0.59% 105.80 kB 106.42 kB +0.42% 25.36 kB 25.47 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.js +0.58% 97.87 kB 98.44 kB +0.36% 23.22 kB 23.31 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.js +0.58% 97.87 kB 98.44 kB +0.36% 23.22 kB 23.31 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.js +0.58% 107.52 kB 108.15 kB +0.39% 25.81 kB 25.91 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js +0.57% 99.95 kB 100.52 kB +0.35% 23.72 kB 23.80 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js +0.57% 99.95 kB 100.52 kB +0.35% 23.72 kB 23.80 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js +0.57% 100.53 kB 101.10 kB +0.39% 24.05 kB 24.14 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js +0.57% 100.53 kB 101.10 kB +0.39% 24.05 kB 24.14 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.57% 109.32 kB 109.94 kB +0.39% 26.05 kB 26.15 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.development.js +0.57% 109.32 kB 109.94 kB +0.39% 26.05 kB 26.15 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-server.node.production.js +0.56% 101.88 kB 102.45 kB +0.42% 23.96 kB 24.06 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.56% 111.25 kB 111.87 kB +0.39% 26.55 kB 26.66 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.development.js +0.56% 111.25 kB 111.87 kB +0.39% 26.55 kB 26.66 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js +0.56% 102.60 kB 103.18 kB +0.33% 24.60 kB 24.69 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js +0.56% 102.60 kB 103.18 kB +0.33% 24.60 kB 24.69 kB
oss-stable-semver/react-client/cjs/react-client-flight.production.min.js +0.55% 10.38 kB 10.44 kB +0.57% 3.88 kB 3.90 kB
oss-stable/react-client/cjs/react-client-flight.production.min.js +0.55% 10.38 kB 10.44 kB +0.57% 3.88 kB 3.90 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.production.min.js +0.54% 10.54 kB 10.60 kB +0.65% 4.01 kB 4.04 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.production.min.js +0.54% 10.54 kB 10.60 kB +0.65% 4.01 kB 4.04 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +0.54% 105.60 kB 106.16 kB +0.39% 24.84 kB 24.94 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-server.node.development.js +0.54% 105.60 kB 106.16 kB +0.39% 24.84 kB 24.94 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.js +0.53% 108.03 kB 108.60 kB +0.44% 25.35 kB 25.46 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.js +0.52% 110.10 kB 110.68 kB +0.42% 25.85 kB 25.96 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.js +0.52% 110.69 kB 111.26 kB +0.40% 26.19 kB 26.29 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js +0.51% 111.75 kB 112.32 kB +0.38% 26.21 kB 26.31 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.development.js +0.51% 111.75 kB 112.32 kB +0.38% 26.21 kB 26.31 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.js +0.51% 112.76 kB 113.33 kB +0.39% 26.75 kB 26.85 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.min.js +0.51% 11.28 kB 11.34 kB +0.58% 4.30 kB 4.33 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.min.js +0.51% 11.28 kB 11.34 kB +0.58% 4.30 kB 4.33 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +0.50% 11.40 kB 11.46 kB +0.60% 4.34 kB 4.36 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +0.50% 11.40 kB 11.46 kB +0.60% 4.34 kB 4.36 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0.50% 114.04 kB 114.61 kB +0.38% 26.77 kB 26.87 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0.50% 114.04 kB 114.61 kB +0.38% 26.77 kB 26.87 kB
oss-stable-semver/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.production.min.js +0.50% 11.47 kB 11.53 kB +0.52% 4.38 kB 4.40 kB
oss-stable/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.production.min.js +0.50% 11.47 kB 11.53 kB +0.52% 4.38 kB 4.40 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +0.50% 114.39 kB 114.96 kB +0.36% 27.05 kB 27.15 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.development.js +0.50% 114.39 kB 114.96 kB +0.36% 27.05 kB 27.15 kB
oss-experimental/react-client/cjs/react-client-flight.production.min.js +0.49% 11.57 kB 11.63 kB +0.47% 4.22 kB 4.24 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +0.49% 11.60 kB 11.65 kB +0.54% 4.42 kB 4.44 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +0.49% 11.60 kB 11.65 kB +0.54% 4.42 kB 4.44 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +0.49% 116.68 kB 117.24 kB +0.34% 27.67 kB 27.76 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js +0.49% 116.68 kB 117.24 kB +0.34% 27.67 kB 27.76 kB
oss-stable-semver/react-server-dom-esm/esm/react-server-dom-esm-client.browser.production.min.js +0.48% 40.06 kB 40.25 kB +0.55% 9.71 kB 9.77 kB
oss-stable/react-server-dom-esm/esm/react-server-dom-esm-client.browser.production.min.js +0.48% 40.06 kB 40.25 kB +0.55% 9.71 kB 9.77 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.production.js +0.48% 40.17 kB 40.37 kB +0.54% 9.74 kB 9.79 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.production.js +0.48% 40.17 kB 40.37 kB +0.54% 9.74 kB 9.79 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.production.min.js +0.48% 11.85 kB 11.91 kB +0.55% 4.37 kB 4.39 kB
oss-stable-semver/react-client/cjs/react-client-flight.production.js +0.48% 40.66 kB 40.85 kB +0.48% 10.19 kB 10.24 kB
oss-stable/react-client/cjs/react-client-flight.production.js +0.48% 40.66 kB 40.85 kB +0.48% 10.19 kB 10.24 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js +0.46% 94.53 kB 94.97 kB +0.26% 22.83 kB 22.89 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js +0.46% 94.53 kB 94.97 kB +0.26% 22.83 kB 22.89 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.min.js +0.45% 12.59 kB 12.65 kB +0.58% 4.65 kB 4.68 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js +0.45% 96.78 kB 97.22 kB +0.25% 23.43 kB 23.49 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js +0.45% 96.78 kB 97.22 kB +0.25% 23.43 kB 23.49 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.min.js +0.45% 12.71 kB 12.77 kB +0.53% 4.69 kB 4.71 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js +0.45% 43.43 kB 43.63 kB +0.48% 10.69 kB 10.74 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js +0.45% 43.43 kB 43.63 kB +0.48% 10.69 kB 10.74 kB
oss-experimental/react-server-dom-turbopack/umd/react-server-dom-turbopack-client.browser.production.min.js +0.45% 12.78 kB 12.84 kB +0.53% 4.73 kB 4.76 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.node.production.min.js +0.45% 12.80 kB 12.86 kB +0.49% 4.71 kB 4.73 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.node.production.min.js +0.45% 12.80 kB 12.86 kB +0.49% 4.71 kB 4.73 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-client.browser.production.min.js +0.44% 12.91 kB 12.96 kB +0.48% 4.77 kB 4.80 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js +0.44% 43.95 kB 44.14 kB +0.49% 10.85 kB 10.90 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js +0.44% 43.95 kB 44.14 kB +0.49% 10.85 kB 10.90 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +0.43% 13.20 kB 13.25 kB +0.47% 4.89 kB 4.91 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +0.43% 13.20 kB 13.25 kB +0.47% 4.89 kB 4.91 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.production.min.js +0.43% 13.20 kB 13.26 kB +0.47% 4.89 kB 4.91 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.production.min.js +0.43% 13.20 kB 13.26 kB +0.47% 4.89 kB 4.91 kB
oss-experimental/react-server-dom-esm/esm/react-server-dom-esm-client.browser.production.min.js +0.43% 45.15 kB 45.34 kB +0.44% 10.71 kB 10.76 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.browser.production.js +0.43% 45.26 kB 45.46 kB +0.45% 10.74 kB 10.79 kB
oss-experimental/react-client/cjs/react-client-flight.production.js +0.42% 45.65 kB 45.85 kB +0.45% 11.18 kB 11.23 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.min.js +0.42% 13.51 kB 13.57 kB +0.50% 5.01 kB 5.03 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.min.js +0.42% 13.51 kB 13.57 kB +0.50% 5.01 kB 5.03 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +0.42% 13.52 kB 13.58 kB +0.50% 5.02 kB 5.04 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +0.42% 13.52 kB 13.58 kB +0.50% 5.02 kB 5.04 kB
facebook-www/ReactFlightDOMServer-prod.modern.js +0.42% 38.69 kB 38.86 kB +0.23% 8.82 kB 8.84 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.js +0.42% 105.14 kB 105.58 kB +0.33% 25.14 kB 25.23 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.min.js +0.41% 13.81 kB 13.86 kB +0.47% 5.10 kB 5.13 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.min.js +0.41% 13.81 kB 13.86 kB +0.47% 5.10 kB 5.13 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +0.41% 13.81 kB 13.87 kB +0.45% 5.11 kB 5.13 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +0.41% 13.81 kB 13.87 kB +0.45% 5.11 kB 5.13 kB
oss-stable-semver/react-server-dom-esm/cjs/react-server-dom-esm-client.node.production.js +0.41% 47.36 kB 47.55 kB +0.44% 11.53 kB 11.59 kB
oss-stable/react-server-dom-esm/cjs/react-server-dom-esm-client.node.production.js +0.41% 47.36 kB 47.55 kB +0.44% 11.53 kB 11.59 kB
oss-stable-semver/react-server-dom-turbopack/umd/react-server-dom-turbopack-server.browser.development.js +0.41% 114.65 kB 115.12 kB +0.22% 26.17 kB 26.23 kB
oss-stable/react-server-dom-turbopack/umd/react-server-dom-turbopack-server.browser.development.js +0.41% 114.65 kB 115.12 kB +0.22% 26.17 kB 26.23 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.js +0.41% 107.39 kB 107.83 kB +0.32% 25.75 kB 25.83 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.node.production.min.js +0.40% 14.13 kB 14.18 kB +0.47% 5.07 kB 5.10 kB
oss-experimental/react-server/cjs/react-server-flight.production.min.js +0.40% 18.68 kB 18.75 kB +0.07% 6.70 kB 6.70 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +0.40% 117.22 kB 117.69 kB +0.28% 26.83 kB 26.91 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.development.js +0.40% 117.22 kB 117.69 kB +0.28% 26.83 kB 26.91 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.browser.production.js +0.40% 48.52 kB 48.72 kB +0.44% 11.68 kB 11.73 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js +0.40% 29.63 kB 29.75 kB +0.21% 9.90 kB 9.92 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +0.40% 108.61 kB 109.05 kB +0.24% 25.86 kB 25.92 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.development.js +0.40% 108.61 kB 109.05 kB +0.24% 25.86 kB 25.92 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.browser.production.js +0.40% 49.04 kB 49.23 kB +0.45% 11.84 kB 11.89 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.production.js +0.39% 49.15 kB 49.34 kB +0.42% 12.08 kB 12.14 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.production.js +0.39% 49.15 kB 49.34 kB +0.42% 12.08 kB 12.14 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.js +0.39% 49.18 kB 49.37 kB +0.42% 12.11 kB 12.16 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.js +0.39% 49.18 kB 49.37 kB +0.42% 12.11 kB 12.16 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +0.39% 30.04 kB 30.15 kB +0.21% 10.00 kB 10.02 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +0.39% 14.52 kB 14.58 kB +0.48% 5.26 kB 5.29 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.production.min.js +0.39% 14.53 kB 14.58 kB +0.48% 5.26 kB 5.29 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +0.39% 111.06 kB 111.49 kB +0.26% 26.52 kB 26.59 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.development.js +0.39% 111.06 kB 111.49 kB +0.26% 26.52 kB 26.59 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.min.js +0.38% 14.84 kB 14.89 kB +0.48% 5.37 kB 5.39 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.min.js +0.38% 14.84 kB 14.90 kB +0.50% 5.38 kB 5.41 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js +0.38% 50.59 kB 50.78 kB +0.40% 12.45 kB 12.50 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js +0.38% 50.59 kB 50.78 kB +0.40% 12.45 kB 12.50 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js +0.38% 50.61 kB 50.81 kB +0.40% 12.49 kB 12.54 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js +0.38% 50.61 kB 50.81 kB +0.40% 12.49 kB 12.54 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.min.js +0.38% 15.12 kB 15.17 kB +0.46% 5.46 kB 5.49 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.min.js +0.38% 15.12 kB 15.18 kB +0.46% 5.47 kB 5.50 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.js +0.38% 51.49 kB 51.69 kB +0.38% 12.65 kB 12.70 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.js +0.38% 51.49 kB 51.69 kB +0.38% 12.65 kB 12.70 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js +0.38% 51.52 kB 51.71 kB +0.39% 12.69 kB 12.74 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js +0.38% 51.52 kB 51.71 kB +0.39% 12.69 kB 12.74 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-client.node.production.js +0.37% 52.45 kB 52.64 kB +0.46% 12.55 kB 12.60 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.unbundled.production.js +0.36% 54.24 kB 54.43 kB +0.44% 13.10 kB 13.15 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.unbundled.production.js +0.36% 54.27 kB 54.46 kB +0.43% 13.12 kB 13.17 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.node.production.js +0.35% 55.68 kB 55.87 kB +0.42% 13.45 kB 13.51 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.node.production.js +0.35% 55.70 kB 55.90 kB +0.41% 13.50 kB 13.55 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-client.edge.production.js +0.34% 56.58 kB 56.78 kB +0.37% 13.66 kB 13.71 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-client.edge.production.js +0.34% 56.61 kB 56.80 kB +0.37% 13.70 kB 13.75 kB
facebook-www/ReactFlightDOMClient-prod.modern.js +0.33% 19.03 kB 19.09 kB +0.55% 4.52 kB 4.54 kB
oss-experimental/react-server-dom-esm/cjs/react-server-dom-esm-server.node.production.min.js +0.31% 27.84 kB 27.93 kB +0.16% 9.54 kB 9.55 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.unbundled.production.min.js +0.29% 30.38 kB 30.47 kB +0.16% 10.19 kB 10.20 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.node.production.min.js +0.28% 30.88 kB 30.96 kB +0.16% 10.33 kB 10.35 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +0.28% 30.95 kB 31.04 kB +0.13% 10.33 kB 10.35 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js +0.28% 31.46 kB 31.55 kB +0.14% 10.49 kB 10.51 kB
oss-experimental/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.browser.production.min.js +0.26% 29.13 kB 29.21 kB +0.07% 9.75 kB 9.76 kB
oss-experimental/react-server-dom-turbopack/umd/react-server-dom-turbopack-server.browser.production.min.js +0.25% 29.24 kB 29.32 kB +0.17% 9.85 kB 9.87 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js +0.25% 29.66 kB 29.73 kB +0.07% 9.88 kB 9.89 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js +0.25% 29.76 kB 29.83 kB +0.10% 9.99 kB 10.00 kB
oss-stable-semver/react-server/cjs/react-server-flight.production.min.js +0.24% 16.26 kB 16.30 kB +0.17% 6.04 kB 6.05 kB
oss-stable/react-server/cjs/react-server-flight.production.min.js +0.24% 16.26 kB 16.30 kB +0.17% 6.04 kB 6.05 kB
oss-stable-semver/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js +0.23% 27.10 kB 27.17 kB +0.20% 9.22 kB 9.24 kB
oss-stable/react-server-dom-turbopack/cjs/react-server-dom-turbopack-server.edge.production.min.js +0.23% 27.10 kB 27.17 kB +0.20% 9.22 kB 9.24 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +0.22% 27.51 kB 27.57 kB +0.20% 9.31 kB 9.33 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js +0.22% 27.51 kB 27.57 kB +0.20% 9.31 kB 9.33 kB
test_utils/ReactAllWarnings.js Deleted 67.04 kB 0.00 kB Deleted 16.43 kB 0.00 kB

Generated by 🚫 dangerJS against 609cb19

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sebmarkbage
sebmarkbage commented Feb 20, 2024
View reviewed changes
Comment thread packages/react-server/src/ReactFlightServer.js
patchConsole(console, 'log');
patchConsole(console, 'table');
patchConsole(console, 'trace');
patchConsole(console, 'warn');

@sebmarkbage sebmarkbage Feb 20, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some notable omissions from this list:

clear: This could make sense but it really refers to clearing the Flight runtime logs, it doesn't really imply that it should also clear the client.

time, timeLog, timeEnd, count, countReset: These run performance timings or state so it doesn't really make sense to replay these on the client. Instead we could run them in user space on the server and then write the result on the client.

profile, profileEnd, timeStamp: These really apply to profiles of an inspector running against the server so doesn't make sense to run on the client.

createTask and memory: These aren't side effects. You could log the result though. createTask might need deeper integration to forward the new stack.

context: This isn't really used anywhere. From what I can tell it's just built-in to v8 but without any UI. This could potentially actually be useful during replaying to put everything into an RSC context, depending on what the UI ends up looking like.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sebmarkbage

sebmarkbage commented Feb 20, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

One thing I'll probably need to fix is that the default onError handler calls console.error but those should probably not be logged since they'll also be rethrown on the client too. We can just disable the request context while calling onError/onPostpone. Edit: Done.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sebmarkbage

sebmarkbage commented Feb 20, 2024

Copy link
Copy Markdown
Contributor Author

Notably if you're running the server in an embedded environment were the inspector is connected to both at the same time, then it might be better not to print them again since they're already in the same log with full inspection capabilities. Although ideally it should still track them for React DevTools to pick them up. We could potentially do something special in the server.browser.js build.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sebmarkbage
sebmarkbage force-pushed the flightlogs branch from 0361411 to 2317ab7 Compare February 20, 2024 17:55
@sebmarkbage

sebmarkbage commented Feb 20, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

One flaw in the current serialization is that console.log(error) just yields an empty object since Error objects don't have enumerable properties. They're getters. We also don't have a way to serialize Errors as values in the protocol since we only serialize errors as throws. Might need a special case but really any class like this could be missing getters.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sebmarkbage
sebmarkbage force-pushed the flightlogs branch 3 times, most recently from a2ef462 to d05a7b9 Compare February 20, 2024 18:17
sebmarkbage added 6 commits February 20, 2024 14:24
@sebmarkbage
Disable log tear down check in tests
970b241
@sebmarkbage
Add flag
33e1cbf
@sebmarkbage
Instrument console in a Flight server environment and replay them on …
4d8861e
…the client
@sebmarkbage
Pass stack trace as part as part of the console entry
a5f5528
@sebmarkbage
Serialize console arguments using a special model serializer
2fe5fb0
This allows complex objects to be logged and inspected on the client.

We limit the depth of objects after 20 objects are written. This deals
with cycles too.

Because these objects aren't the complete model we can't cache them
but if the full thing is already written, we can reuse that. This might
not be fully ok since if there's an error:ed reference inside of it,
it would error the log.

This should never error nor suspend.

Functions are emitted as eval of their source string to produce a similar
looking function on the client.

Unresolved Promises are serialized as infinite promises.
@sebmarkbage
Don't replay consoles written inside onError/onPostpone.
609cb19
These aren't conceptually part of the request's render so we exit the
request context for those.
@sebmarkbage
sebmarkbage force-pushed the flightlogs branch from d05a7b9 to 609cb19 Compare February 20, 2024 19:25
@sebmarkbage sebmarkbage mentioned this pull request Feb 21, 2024
[Flight] Prefix Replayed Console Logs with a Badge #28403
Merged
gnoff
gnoff approved these changes Feb 21, 2024
View reviewed changes
Comment thread scripts/jest/setupTests.js
Comment on lines +99 to +101
// throw new Error(
// `Test did not tear down console.${methodName} mock properly.`
// );

@gnoff gnoff Feb 21, 2024

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to deactivate this permanently?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sebmarkbage sebmarkbage Feb 21, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Although I'm not sure the best strategy to go forward with here. Ideally we'd delete it but maybe there's some way to restore it? I guess I'll leave it commented out for now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@sebmarkbage
sebmarkbage merged commit 9a5b6bd into react:main Feb 21, 2024
github-actions Bot pushed a commit that referenced this pull request Feb 21, 2024
@sebmarkbage
[Flight] Instrument the Console in the RSC Environment and Replay Log…
238477b
…s on the Client (#28384)

When developing in an RSC environment, you should be able to work in a
single environment as if it was a unified environment. With thrown
errors we already serialize them and then rethrow them on the client.

Since by default we log them via onError both in Flight and Fizz, you
can get the same log in the RSC runtime, the SSR runtime and on the
client.

With console logs made in SSR renders, you typically replay the same
code during hydration on the client. So for example warnings already
show up both in the SSR logs and on the client (although not guaranteed
to be the same). You could just spend your time in the client and you'd
be fine.

Previously, RSC logs would not be replayed because they don't hydrate.
So it's easy to miss warnings for example.

With this approach, we replay RSC logs both during SSR so they end up in
the SSR logs and on the client. That way you can just stay in the
browser window during normal development cycles. You shouldn't have to
care if your component is a server or client component when working on
logical things or iterating on a product.

With this change, you probably should mostly ignore the Flight log
stream and just look at the client or maybe the SSR one. Unless you're
digging into something specific. In particular if you just naively run
both Flight and Fizz in the same terminal you get duplicates. I like to
run out fixtures `yarn dev:region` and `yarn dev:global` in two separate
terminals.

Console logs may contain complex objects which can be inspected. Ideally
a DevTools inspector could reach into the RSC server and remotely
inspect objects using the remote inspection protocol. That way complex
objects can be loaded on demand as you expand into them. However, that
is a complex environment to set up and the server might not even be
alive anymore by the time you inspect the objects. Therefore, I do a
best effort to serialize the objects using the RSC protocol but limit
the depth that can be rendered.

This feature is only own in dev mode since it can be expensive.

In a follow up, I'll give the logs a special styling treatment to
clearly differentiate them from logs coming from the client. As well as
deal with stacks.

DiffTrain build for [9a5b6bd](9a5b6bd)
sebmarkbage added a commit that referenced this pull request Feb 21, 2024
@sebmarkbage
[Flight] Prefix Replayed Console Logs with a Badge (#28403)
c027406
Builds on top of #28384.

This prefixes each log with a badge similar to how we badge built-ins
like "ForwardRef" and "Memo" in the React DevTools. The idea is that we
can add such badges in DevTools for Server Components too to carry on
the consistency.

This puts the "environment" name in the badge which defaults to
"Server". So you know which source it is coming from.

We try to use the same styling as the React DevTools. We use light-dark
mode where available to support the two different color styles, but if
it's not available I use a fixed background so that it's always readable
even in dark mode.

In Terminals, instead of hard coding colors that might not look good
with some themes, I use the ANSI color code to flip
background/foreground colors in that case.

In earlier commits I had it on the end of the line similar to the
DevTools badges but for multiline I found it better to prefix it. We
could try various options tough.

In most cases we can use both ANSI and the `%c` CSS color specifier,
because node will only use ANSI and hide the other. Chrome supports both
but the color overrides ANSI if it comes later (and Chrome doesn't
support color inverting anyway). Safari/Firefox prints the ANSI, so it
can only use CSS colors.

Therefore in browser builds I exclude ANSI.

On the server I support both so if you use Chrome inspector on the
server, you get nice colors on both terminal and in the inspector.

Since Bun uses WebKit inspector and it prints the ANSI we can't safely
emit both there. However, we also can't emit just the color specifier
because then it prints in the terminal.
oven-sh/bun#9021 So we just use a plain string
prefix for now with a bracket until that's fixed.

Screen shots:

<img width="758" alt="Screenshot 2024-02-21 at 12 56 02 AM"
src="https://github.com/facebook/react/assets/63648/4f887ffe-fffe-4402-bf2a-b7890986d60c">
<img width="759" alt="Screenshot 2024-02-21 at 12 56 24 AM"
src="https://github.com/facebook/react/assets/63648/f32d432f-f738-4872-a700-ea0a78e6c745">
<img width="514" alt="Screenshot 2024-02-21 at 12 57 10 AM"
src="https://github.com/facebook/react/assets/63648/205d2e82-75b7-4e2b-9d9c-aa9e2cbedf39">
<img width="489" alt="Screenshot 2024-02-21 at 12 57 34 AM"
src="https://github.com/facebook/react/assets/63648/ea52d1e4-b9fa-431d-ae9e-ccb87631f399">
<img width="516" alt="Screenshot 2024-02-21 at 12 58 23 AM"
src="https://github.com/facebook/react/assets/63648/52b50fac-bec0-471d-a457-1a10d8df9172">
<img width="956" alt="Screenshot 2024-02-21 at 12 58 56 AM"
src="https://github.com/facebook/react/assets/63648/0096ed61-5eff-4aa9-8a8a-2204e754bd1f">
github-actions Bot pushed a commit that referenced this pull request Feb 21, 2024
@sebmarkbage
[Flight] Prefix Replayed Console Logs with a Badge (#28403)
0c056c9
Builds on top of #28384.

This prefixes each log with a badge similar to how we badge built-ins
like "ForwardRef" and "Memo" in the React DevTools. The idea is that we
can add such badges in DevTools for Server Components too to carry on
the consistency.

This puts the "environment" name in the badge which defaults to
"Server". So you know which source it is coming from.

We try to use the same styling as the React DevTools. We use light-dark
mode where available to support the two different color styles, but if
it's not available I use a fixed background so that it's always readable
even in dark mode.

In Terminals, instead of hard coding colors that might not look good
with some themes, I use the ANSI color code to flip
background/foreground colors in that case.

In earlier commits I had it on the end of the line similar to the
DevTools badges but for multiline I found it better to prefix it. We
could try various options tough.

In most cases we can use both ANSI and the `%c` CSS color specifier,
because node will only use ANSI and hide the other. Chrome supports both
but the color overrides ANSI if it comes later (and Chrome doesn't
support color inverting anyway). Safari/Firefox prints the ANSI, so it
can only use CSS colors.

Therefore in browser builds I exclude ANSI.

On the server I support both so if you use Chrome inspector on the
server, you get nice colors on both terminal and in the inspector.

Since Bun uses WebKit inspector and it prints the ANSI we can't safely
emit both there. However, we also can't emit just the color specifier
because then it prints in the terminal.
oven-sh/bun#9021 So we just use a plain string
prefix for now with a bracket until that's fixed.

Screen shots:

<img width="758" alt="Screenshot 2024-02-21 at 12 56 02 AM"
src="https://github.com/facebook/react/assets/63648/4f887ffe-fffe-4402-bf2a-b7890986d60c">
<img width="759" alt="Screenshot 2024-02-21 at 12 56 24 AM"
src="https://github.com/facebook/react/assets/63648/f32d432f-f738-4872-a700-ea0a78e6c745">
<img width="514" alt="Screenshot 2024-02-21 at 12 57 10 AM"
src="https://github.com/facebook/react/assets/63648/205d2e82-75b7-4e2b-9d9c-aa9e2cbedf39">
<img width="489" alt="Screenshot 2024-02-21 at 12 57 34 AM"
src="https://github.com/facebook/react/assets/63648/ea52d1e4-b9fa-431d-ae9e-ccb87631f399">
<img width="516" alt="Screenshot 2024-02-21 at 12 58 23 AM"
src="https://github.com/facebook/react/assets/63648/52b50fac-bec0-471d-a457-1a10d8df9172">
<img width="956" alt="Screenshot 2024-02-21 at 12 58 56 AM"
src="https://github.com/facebook/react/assets/63648/0096ed61-5eff-4aa9-8a8a-2204e754bd1f">

DiffTrain build for [c027406](c027406)
@huozhi huozhi mentioned this pull request Feb 26, 2024
Upgrade vendored react vercel/next.js#62549
Merged
huozhi added a commit to vercel/next.js that referenced this pull request Feb 26, 2024
@huozhi
Upgrade vendored react (#62549)
87015ac
### React upstream changes

- react/react#28438
- react/react#28436
- react/react#25954
- react/react#28434
- react/react#28433
- react/react#28432
- react/react#28415
- react/react#27903
- react/react#28430
- react/react#28424
- react/react#28400
- react/react#28422
- react/react#28423
- react/react#28412
- react/react#28418
- react/react#28421
- react/react#28417
- react/react#28399
- react/react#28408
- react/react#28350
- react/react#28387
- react/react#28403
- react/react#28384
- react/react#28409
- react/react#28398
- react/react#28405
- react/react#28328
- react/react#28402
- react/react#28386
- react/react#28388
- react/react#28379
- react/react#28383
- react/react#28390
- react/react#28389
- react/react#28382
- react/react#28348



Closes NEXT-2600
@ztanner ztanner mentioned this pull request Mar 19, 2024
(backport) Update React from 60a927d04 to 14898b6a9 vercel/next.js#63442
Closed
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@sebmarkbage @AndyPengc12
[Flight] Instrument the Console in the RSC Environment and Replay Log…
19c3266
…s on the Client (react#28384)

When developing in an RSC environment, you should be able to work in a
single environment as if it was a unified environment. With thrown
errors we already serialize them and then rethrow them on the client.

Since by default we log them via onError both in Flight and Fizz, you
can get the same log in the RSC runtime, the SSR runtime and on the
client.

With console logs made in SSR renders, you typically replay the same
code during hydration on the client. So for example warnings already
show up both in the SSR logs and on the client (although not guaranteed
to be the same). You could just spend your time in the client and you'd
be fine.

Previously, RSC logs would not be replayed because they don't hydrate.
So it's easy to miss warnings for example.

With this approach, we replay RSC logs both during SSR so they end up in
the SSR logs and on the client. That way you can just stay in the
browser window during normal development cycles. You shouldn't have to
care if your component is a server or client component when working on
logical things or iterating on a product.

With this change, you probably should mostly ignore the Flight log
stream and just look at the client or maybe the SSR one. Unless you're
digging into something specific. In particular if you just naively run
both Flight and Fizz in the same terminal you get duplicates. I like to
run out fixtures `yarn dev:region` and `yarn dev:global` in two separate
terminals.

Console logs may contain complex objects which can be inspected. Ideally
a DevTools inspector could reach into the RSC server and remotely
inspect objects using the remote inspection protocol. That way complex
objects can be loaded on demand as you expand into them. However, that
is a complex environment to set up and the server might not even be
alive anymore by the time you inspect the objects. Therefore, I do a
best effort to serialize the objects using the RSC protocol but limit
the depth that can be rendered.

This feature is only own in dev mode since it can be expensive.

In a follow up, I'll give the logs a special styling treatment to
clearly differentiate them from logs coming from the client. As well as
deal with stacks.
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@sebmarkbage @AndyPengc12
[Flight] Prefix Replayed Console Logs with a Badge (react#28403)
9a1fd67
Builds on top of react#28384.

This prefixes each log with a badge similar to how we badge built-ins
like "ForwardRef" and "Memo" in the React DevTools. The idea is that we
can add such badges in DevTools for Server Components too to carry on
the consistency.

This puts the "environment" name in the badge which defaults to
"Server". So you know which source it is coming from.

We try to use the same styling as the React DevTools. We use light-dark
mode where available to support the two different color styles, but if
it's not available I use a fixed background so that it's always readable
even in dark mode.

In Terminals, instead of hard coding colors that might not look good
with some themes, I use the ANSI color code to flip
background/foreground colors in that case.

In earlier commits I had it on the end of the line similar to the
DevTools badges but for multiline I found it better to prefix it. We
could try various options tough.

In most cases we can use both ANSI and the `%c` CSS color specifier,
because node will only use ANSI and hide the other. Chrome supports both
but the color overrides ANSI if it comes later (and Chrome doesn't
support color inverting anyway). Safari/Firefox prints the ANSI, so it
can only use CSS colors.

Therefore in browser builds I exclude ANSI.

On the server I support both so if you use Chrome inspector on the
server, you get nice colors on both terminal and in the inspector.

Since Bun uses WebKit inspector and it prints the ANSI we can't safely
emit both there. However, we also can't emit just the color specifier
because then it prints in the terminal.
oven-sh/bun#9021 So we just use a plain string
prefix for now with a bracket until that's fixed.

Screen shots:

<img width="758" alt="Screenshot 2024-02-21 at 12 56 02 AM"
src="https://github.com/facebook/react/assets/63648/4f887ffe-fffe-4402-bf2a-b7890986d60c">
<img width="759" alt="Screenshot 2024-02-21 at 12 56 24 AM"
src="https://github.com/facebook/react/assets/63648/f32d432f-f738-4872-a700-ea0a78e6c745">
<img width="514" alt="Screenshot 2024-02-21 at 12 57 10 AM"
src="https://github.com/facebook/react/assets/63648/205d2e82-75b7-4e2b-9d9c-aa9e2cbedf39">
<img width="489" alt="Screenshot 2024-02-21 at 12 57 34 AM"
src="https://github.com/facebook/react/assets/63648/ea52d1e4-b9fa-431d-ae9e-ccb87631f399">
<img width="516" alt="Screenshot 2024-02-21 at 12 58 23 AM"
src="https://github.com/facebook/react/assets/63648/52b50fac-bec0-471d-a457-1a10d8df9172">
<img width="956" alt="Screenshot 2024-02-21 at 12 58 56 AM"
src="https://github.com/facebook/react/assets/63648/0096ed61-5eff-4aa9-8a8a-2204e754bd1f">
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@sebmarkbage
[Flight] Instrument the Console in the RSC Environment and Replay Log…
1e2c800
…s on the Client (#28384)

When developing in an RSC environment, you should be able to work in a
single environment as if it was a unified environment. With thrown
errors we already serialize them and then rethrow them on the client.

Since by default we log them via onError both in Flight and Fizz, you
can get the same log in the RSC runtime, the SSR runtime and on the
client.

With console logs made in SSR renders, you typically replay the same
code during hydration on the client. So for example warnings already
show up both in the SSR logs and on the client (although not guaranteed
to be the same). You could just spend your time in the client and you'd
be fine.

Previously, RSC logs would not be replayed because they don't hydrate.
So it's easy to miss warnings for example.

With this approach, we replay RSC logs both during SSR so they end up in
the SSR logs and on the client. That way you can just stay in the
browser window during normal development cycles. You shouldn't have to
care if your component is a server or client component when working on
logical things or iterating on a product.

With this change, you probably should mostly ignore the Flight log
stream and just look at the client or maybe the SSR one. Unless you're
digging into something specific. In particular if you just naively run
both Flight and Fizz in the same terminal you get duplicates. I like to
run out fixtures `yarn dev:region` and `yarn dev:global` in two separate
terminals.

Console logs may contain complex objects which can be inspected. Ideally
a DevTools inspector could reach into the RSC server and remotely
inspect objects using the remote inspection protocol. That way complex
objects can be loaded on demand as you expand into them. However, that
is a complex environment to set up and the server might not even be
alive anymore by the time you inspect the objects. Therefore, I do a
best effort to serialize the objects using the RSC protocol but limit
the depth that can be rendered.

This feature is only own in dev mode since it can be expensive.

In a follow up, I'll give the logs a special styling treatment to
clearly differentiate them from logs coming from the client. As well as
deal with stacks.

DiffTrain build for commit 9a5b6bd.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@sebmarkbage
[Flight] Prefix Replayed Console Logs with a Badge (#28403)
d77e880
Builds on top of #28384.

This prefixes each log with a badge similar to how we badge built-ins
like "ForwardRef" and "Memo" in the React DevTools. The idea is that we
can add such badges in DevTools for Server Components too to carry on
the consistency.

This puts the "environment" name in the badge which defaults to
"Server". So you know which source it is coming from.

We try to use the same styling as the React DevTools. We use light-dark
mode where available to support the two different color styles, but if
it's not available I use a fixed background so that it's always readable
even in dark mode.

In Terminals, instead of hard coding colors that might not look good
with some themes, I use the ANSI color code to flip
background/foreground colors in that case.

In earlier commits I had it on the end of the line similar to the
DevTools badges but for multiline I found it better to prefix it. We
could try various options tough.

In most cases we can use both ANSI and the `%c` CSS color specifier,
because node will only use ANSI and hide the other. Chrome supports both
but the color overrides ANSI if it comes later (and Chrome doesn't
support color inverting anyway). Safari/Firefox prints the ANSI, so it
can only use CSS colors.

Therefore in browser builds I exclude ANSI.

On the server I support both so if you use Chrome inspector on the
server, you get nice colors on both terminal and in the inspector.

Since Bun uses WebKit inspector and it prints the ANSI we can't safely
emit both there. However, we also can't emit just the color specifier
because then it prints in the terminal.
oven-sh/bun#9021 So we just use a plain string
prefix for now with a bracket until that's fixed.

Screen shots:

<img width="758" alt="Screenshot 2024-02-21 at 12 56 02 AM"
src="https://github.com/facebook/react/assets/63648/4f887ffe-fffe-4402-bf2a-b7890986d60c">
<img width="759" alt="Screenshot 2024-02-21 at 12 56 24 AM"
src="https://github.com/facebook/react/assets/63648/f32d432f-f738-4872-a700-ea0a78e6c745">
<img width="514" alt="Screenshot 2024-02-21 at 12 57 10 AM"
src="https://github.com/facebook/react/assets/63648/205d2e82-75b7-4e2b-9d9c-aa9e2cbedf39">
<img width="489" alt="Screenshot 2024-02-21 at 12 57 34 AM"
src="https://github.com/facebook/react/assets/63648/ea52d1e4-b9fa-431d-ae9e-ccb87631f399">
<img width="516" alt="Screenshot 2024-02-21 at 12 58 23 AM"
src="https://github.com/facebook/react/assets/63648/52b50fac-bec0-471d-a457-1a10d8df9172">
<img width="956" alt="Screenshot 2024-02-21 at 12 58 56 AM"
src="https://github.com/facebook/react/assets/63648/0096ed61-5eff-4aa9-8a8a-2204e754bd1f">

DiffTrain build for commit c027406.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@sebmarkbage
[Flight] Instrument the Console in the RSC Environment and Replay Log…
5d32c84
…s on the Client (react#28384)

When developing in an RSC environment, you should be able to work in a
single environment as if it was a unified environment. With thrown
errors we already serialize them and then rethrow them on the client.

Since by default we log them via onError both in Flight and Fizz, you
can get the same log in the RSC runtime, the SSR runtime and on the
client.

With console logs made in SSR renders, you typically replay the same
code during hydration on the client. So for example warnings already
show up both in the SSR logs and on the client (although not guaranteed
to be the same). You could just spend your time in the client and you'd
be fine.

Previously, RSC logs would not be replayed because they don't hydrate.
So it's easy to miss warnings for example.

With this approach, we replay RSC logs both during SSR so they end up in
the SSR logs and on the client. That way you can just stay in the
browser window during normal development cycles. You shouldn't have to
care if your component is a server or client component when working on
logical things or iterating on a product.

With this change, you probably should mostly ignore the Flight log
stream and just look at the client or maybe the SSR one. Unless you're
digging into something specific. In particular if you just naively run
both Flight and Fizz in the same terminal you get duplicates. I like to
run out fixtures `yarn dev:region` and `yarn dev:global` in two separate
terminals.

Console logs may contain complex objects which can be inspected. Ideally
a DevTools inspector could reach into the RSC server and remotely
inspect objects using the remote inspection protocol. That way complex
objects can be loaded on demand as you expand into them. However, that
is a complex environment to set up and the server might not even be
alive anymore by the time you inspect the objects. Therefore, I do a
best effort to serialize the objects using the RSC protocol but limit
the depth that can be rendered.

This feature is only own in dev mode since it can be expensive.

In a follow up, I'll give the logs a special styling treatment to
clearly differentiate them from logs coming from the client. As well as
deal with stacks.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@sebmarkbage
[Flight] Prefix Replayed Console Logs with a Badge (react#28403)
99bc78f
Builds on top of react#28384.

This prefixes each log with a badge similar to how we badge built-ins
like "ForwardRef" and "Memo" in the React DevTools. The idea is that we
can add such badges in DevTools for Server Components too to carry on
the consistency.

This puts the "environment" name in the badge which defaults to
"Server". So you know which source it is coming from.

We try to use the same styling as the React DevTools. We use light-dark
mode where available to support the two different color styles, but if
it's not available I use a fixed background so that it's always readable
even in dark mode.

In Terminals, instead of hard coding colors that might not look good
with some themes, I use the ANSI color code to flip
background/foreground colors in that case.

In earlier commits I had it on the end of the line similar to the
DevTools badges but for multiline I found it better to prefix it. We
could try various options tough.

In most cases we can use both ANSI and the `%c` CSS color specifier,
because node will only use ANSI and hide the other. Chrome supports both
but the color overrides ANSI if it comes later (and Chrome doesn't
support color inverting anyway). Safari/Firefox prints the ANSI, so it
can only use CSS colors.

Therefore in browser builds I exclude ANSI.

On the server I support both so if you use Chrome inspector on the
server, you get nice colors on both terminal and in the inspector.

Since Bun uses WebKit inspector and it prints the ANSI we can't safely
emit both there. However, we also can't emit just the color specifier
because then it prints in the terminal.
oven-sh/bun#9021 So we just use a plain string
prefix for now with a bracket until that's fixed.

Screen shots:

<img width="758" alt="Screenshot 2024-02-21 at 12 56 02 AM"
src="https://github.com/facebook/react/assets/63648/4f887ffe-fffe-4402-bf2a-b7890986d60c">
<img width="759" alt="Screenshot 2024-02-21 at 12 56 24 AM"
src="https://github.com/facebook/react/assets/63648/f32d432f-f738-4872-a700-ea0a78e6c745">
<img width="514" alt="Screenshot 2024-02-21 at 12 57 10 AM"
src="https://github.com/facebook/react/assets/63648/205d2e82-75b7-4e2b-9d9c-aa9e2cbedf39">
<img width="489" alt="Screenshot 2024-02-21 at 12 57 34 AM"
src="https://github.com/facebook/react/assets/63648/ea52d1e4-b9fa-431d-ae9e-ccb87631f399">
<img width="516" alt="Screenshot 2024-02-21 at 12 58 23 AM"
src="https://github.com/facebook/react/assets/63648/52b50fac-bec0-471d-a457-1a10d8df9172">
<img width="956" alt="Screenshot 2024-02-21 at 12 58 56 AM"
src="https://github.com/facebook/react/assets/63648/0096ed61-5eff-4aa9-8a8a-2204e754bd1f">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gnoff gnoff gnoff approved these changes
@acdlite acdlite Awaiting requested review from acdlite

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@sebmarkbage @react-sizebot @gnoff @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.