Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Float][Fiber] Implement waitForCommitToBeReady for stylesheet resources #26450

Merged
merged 9 commits into from
Mar 25, 2023

Conversation

gnoff
Copy link
Collaborator

@gnoff gnoff commented Mar 21, 2023

Before a commit is finished if any new stylesheet resources are going to mount and we are capable of delaying the commit we will do the following

  1. Wait for all preloads for newly created stylesheet resources to load
  2. Once all preloads are finished we insert the stylesheet instances for these resources and wait for them all to load
  3. Once all stylesheets have loaded we complete the commit

In this PR I also removed the synchronous loadingstate tracking in the fizz runtime. It was not necessary to support the implementation on not used by the fizz runtime itself. It makes the inline script slightly smaller

In this PR I also integrated ReactDOMFloatClient with ReactDOMHostConfig. It leads to better code factoring, something I already did on the server a while back. To make the diff a little easier to follow i make these changes in a single commit so you can look at the change after that commit if helpful

There is a 500ms timeout which will finish the commit even if all suspended host instances have not finished loading yet

At the moment error and load events are treated the same and we're really tracking whether the host instance is finished attempting to load.

@gnoff gnoff requested a review from acdlite March 21, 2023 23:21
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Mar 21, 2023
@gnoff gnoff requested a review from sebmarkbage March 21, 2023 23:21
@react-sizebot
Copy link

react-sizebot commented Mar 21, 2023

Comparing: 9c54b29...9e81f40

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 +1.97% 159.33 kB 162.46 kB +1.76% 50.47 kB 51.36 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +1.95% 161.07 kB 164.20 kB +1.74% 50.98 kB 51.87 kB
facebook-www/ReactDOM-prod.classic.js +1.51% 546.16 kB 554.39 kB +1.46% 96.84 kB 98.25 kB
facebook-www/ReactDOM-prod.modern.js +1.56% 529.86 kB 538.12 kB +1.53% 94.38 kB 95.82 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.production.min.js +2.55% 15.29 kB 15.68 kB +1.28% 4.61 kB 4.67 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.production.min.js +2.55% 15.29 kB 15.68 kB +1.28% 4.61 kB 4.67 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.production.min.js +2.55% 15.29 kB 15.68 kB +1.28% 4.61 kB 4.67 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +2.54% 15.36 kB 15.75 kB +1.27% 4.63 kB 4.69 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +2.54% 15.36 kB 15.75 kB +1.27% 4.63 kB 4.69 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +2.54% 15.36 kB 15.75 kB +1.27% 4.63 kB 4.69 kB
oss-experimental/react-dom/unstable_server-external-runtime.js = 2.86 kB 2.80 kB = 1.29 kB 1.26 kB
oss-stable-semver/react-dom/unstable_server-external-runtime.js = 2.86 kB 2.80 kB = 1.29 kB 1.26 kB
oss-stable/react-dom/unstable_server-external-runtime.js = 2.86 kB 2.80 kB = 1.29 kB 1.26 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-noop-renderer/cjs/react-noop-renderer.production.min.js +2.55% 15.29 kB 15.68 kB +1.28% 4.61 kB 4.67 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.production.min.js +2.55% 15.29 kB 15.68 kB +1.28% 4.61 kB 4.67 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.production.min.js +2.55% 15.29 kB 15.68 kB +1.28% 4.61 kB 4.67 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +2.54% 15.36 kB 15.75 kB +1.27% 4.63 kB 4.69 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +2.54% 15.36 kB 15.75 kB +1.27% 4.63 kB 4.69 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +2.54% 15.36 kB 15.75 kB +1.27% 4.63 kB 4.69 kB
oss-stable-semver/react-dom/cjs/react-dom.production.min.js +1.97% 159.25 kB 162.39 kB +1.77% 50.45 kB 51.34 kB
oss-stable/react-dom/cjs/react-dom.production.min.js +1.97% 159.33 kB 162.46 kB +1.76% 50.47 kB 51.36 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +1.95% 161.07 kB 164.20 kB +1.74% 50.98 kB 51.87 kB
oss-stable-semver/react-dom/umd/react-dom.production.min.js +1.94% 159.21 kB 162.29 kB +1.87% 50.72 kB 51.66 kB
oss-stable/react-dom/umd/react-dom.production.min.js +1.93% 159.28 kB 162.36 kB +1.87% 50.74 kB 51.69 kB
oss-experimental/react-dom/umd/react-dom.production.min.js +1.92% 161.02 kB 164.11 kB +1.87% 51.30 kB 52.25 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.min.js +1.88% 167.28 kB 170.42 kB +1.60% 53.36 kB 54.21 kB
oss-stable-semver/react-dom/cjs/react-dom.profiling.min.js +1.86% 168.87 kB 172.00 kB +1.73% 52.91 kB 53.82 kB
oss-stable/react-dom/cjs/react-dom.profiling.min.js +1.86% 168.94 kB 172.08 kB +1.73% 52.93 kB 53.84 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js +1.84% 170.68 kB 173.82 kB +1.72% 53.44 kB 54.36 kB
oss-stable-semver/react-dom/umd/react-dom.profiling.min.js +1.83% 168.17 kB 171.26 kB +1.67% 53.11 kB 54.00 kB
oss-stable/react-dom/umd/react-dom.profiling.min.js +1.83% 168.24 kB 171.33 kB +1.68% 53.13 kB 54.02 kB
oss-experimental/react-dom/umd/react-dom.profiling.min.js +1.81% 169.99 kB 173.08 kB +1.66% 53.65 kB 54.54 kB
facebook-www/ReactDOM-prod.modern.js +1.56% 529.86 kB 538.12 kB +1.53% 94.38 kB 95.82 kB
facebook-www/ReactDOMTesting-prod.modern.js +1.51% 546.40 kB 554.66 kB +1.54% 98.40 kB 99.92 kB
facebook-www/ReactDOM-prod.classic.js +1.51% 546.16 kB 554.39 kB +1.46% 96.84 kB 98.25 kB
facebook-www/ReactDOM-profiling.modern.js +1.47% 560.13 kB 568.36 kB +1.37% 98.92 kB 100.27 kB
facebook-www/ReactDOMTesting-prod.classic.js +1.47% 560.74 kB 568.95 kB +1.47% 100.37 kB 101.85 kB
facebook-www/ReactDOM-profiling.classic.js +1.43% 576.46 kB 584.69 kB +1.38% 101.40 kB 102.80 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.development.js +1.15% 42.36 kB 42.85 kB +0.57% 9.59 kB 9.65 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.development.js +1.15% 42.36 kB 42.85 kB +0.57% 9.59 kB 9.65 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.development.js +1.15% 42.36 kB 42.85 kB +0.57% 9.59 kB 9.65 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +1.14% 42.49 kB 42.98 kB +0.56% 9.61 kB 9.66 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +1.14% 42.49 kB 42.98 kB +0.56% 9.61 kB 9.66 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +1.14% 42.49 kB 42.98 kB +0.56% 9.61 kB 9.66 kB
oss-stable-semver/react-dom/umd/react-dom.development.js +1.01% 1,283.38 kB 1,296.38 kB +1.02% 273.45 kB 276.23 kB
oss-stable/react-dom/umd/react-dom.development.js +1.01% 1,283.40 kB 1,296.40 kB +1.02% 273.48 kB 276.26 kB
oss-stable-semver/react-dom/cjs/react-dom.development.js +1.01% 1,224.40 kB 1,236.77 kB +1.04% 270.61 kB 273.41 kB
oss-stable/react-dom/cjs/react-dom.development.js +1.01% 1,224.43 kB 1,236.80 kB +1.03% 270.63 kB 273.44 kB
oss-experimental/react-dom/umd/react-dom.development.js +1.00% 1,294.96 kB 1,307.96 kB +0.99% 275.33 kB 278.06 kB
oss-experimental/react-dom/cjs/react-dom.development.js +1.00% 1,235.37 kB 1,247.75 kB +1.02% 272.51 kB 275.29 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.development.js +0.99% 1,253.48 kB 1,265.86 kB +1.01% 276.87 kB 279.68 kB
facebook-www/ReactDOM-dev.modern.js +0.92% 1,356.88 kB 1,369.41 kB +0.99% 293.93 kB 296.84 kB
facebook-www/ReactDOMTesting-dev.modern.js +0.91% 1,375.28 kB 1,387.81 kB +1.00% 298.27 kB 301.25 kB
facebook-www/ReactDOM-dev.classic.js +0.91% 1,384.50 kB 1,397.03 kB +1.02% 299.08 kB 302.14 kB
facebook-www/ReactDOMTesting-dev.classic.js +0.89% 1,402.98 kB 1,415.51 kB +1.05% 303.23 kB 306.42 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js +0.53% 295.15 kB 296.72 kB +0.24% 52.04 kB 52.17 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +0.50% 310.96 kB 312.53 kB +0.27% 54.41 kB 54.56 kB
react-native/implementations/ReactFabric-prod.js +0.50% 316.29 kB 317.86 kB +0.21% 55.49 kB 55.61 kB
react-native/implementations/ReactNativeRenderer-prod.js +0.48% 325.29 kB 326.86 kB +0.28% 57.20 kB 57.36 kB
react-native/implementations/ReactFabric-prod.fb.js +0.48% 327.04 kB 328.61 kB +0.20% 57.52 kB 57.64 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +0.47% 336.03 kB 337.60 kB +0.27% 59.27 kB 59.43 kB
react-native/implementations/ReactFabric-profiling.js +0.47% 335.77 kB 337.34 kB +0.20% 58.66 kB 58.78 kB
react-native/implementations/ReactNativeRenderer-profiling.js +0.45% 344.80 kB 346.37 kB +0.19% 60.43 kB 60.54 kB
react-native/implementations/ReactFabric-profiling.fb.js +0.44% 354.37 kB 355.94 kB +0.17% 61.71 kB 61.81 kB
facebook-www/ReactART-prod.modern.js +0.44% 331.23 kB 332.68 kB +0.22% 56.18 kB 56.30 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +0.43% 363.39 kB 364.96 kB +0.19% 63.53 kB 63.65 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.production.min.js +0.43% 111.25 kB 111.72 kB +0.38% 33.74 kB 33.87 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js +0.43% 111.27 kB 111.75 kB +0.38% 33.76 kB 33.89 kB
facebook-www/ReactART-prod.classic.js +0.42% 342.21 kB 343.66 kB +0.21% 58.08 kB 58.21 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js +0.42% 112.77 kB 113.25 kB +0.37% 34.19 kB 34.31 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.production.min.js +0.40% 102.07 kB 102.49 kB +0.25% 31.23 kB 31.31 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.min.js +0.40% 102.12 kB 102.53 kB +0.24% 31.26 kB 31.33 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.min.js +0.40% 102.25 kB 102.66 kB +0.23% 31.31 kB 31.38 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.profiling.min.js +0.40% 120.25 kB 120.72 kB +0.35% 35.95 kB 36.07 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js +0.40% 120.27 kB 120.75 kB +0.35% 35.97 kB 36.10 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js +0.39% 121.77 kB 122.24 kB +0.38% 36.45 kB 36.58 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.production.min.js +0.37% 102.46 kB 102.84 kB +0.30% 31.68 kB 31.77 kB
oss-stable/react-test-renderer/umd/react-test-renderer.production.min.js +0.37% 102.51 kB 102.89 kB +0.30% 31.70 kB 31.80 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.production.min.js +0.37% 102.64 kB 103.02 kB +0.29% 31.74 kB 31.83 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.development.js +0.33% 805.39 kB 808.08 kB +0.32% 169.33 kB 169.87 kB
oss-stable/react-test-renderer/umd/react-test-renderer.development.js +0.33% 805.42 kB 808.10 kB +0.32% 169.36 kB 169.90 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.development.js +0.33% 805.81 kB 808.50 kB +0.32% 169.44 kB 169.98 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.development.js +0.33% 768.96 kB 771.51 kB +0.34% 167.48 kB 168.04 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.development.js +0.33% 768.99 kB 771.53 kB +0.33% 167.52 kB 168.07 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.development.js +0.33% 769.36 kB 771.90 kB +0.34% 167.61 kB 168.17 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js +0.33% 784.02 kB 786.59 kB +0.33% 169.31 kB 169.87 kB
oss-stable-semver/react-art/cjs/react-art.development.js +0.32% 789.59 kB 792.13 kB +0.34% 171.60 kB 172.18 kB
oss-stable/react-art/cjs/react-art.development.js +0.32% 789.61 kB 792.16 kB +0.34% 171.62 kB 172.20 kB
facebook-www/ReactTestRenderer-dev.modern.js +0.32% 800.26 kB 802.82 kB +0.34% 172.46 kB 173.05 kB
facebook-www/ReactTestRenderer-dev.classic.js +0.32% 800.26 kB 802.82 kB +0.34% 172.46 kB 173.05 kB
oss-experimental/react-art/cjs/react-art.development.js +0.32% 797.92 kB 800.46 kB +0.34% 173.13 kB 173.71 kB
oss-stable-semver/react-art/cjs/react-art.production.min.js +0.32% 94.03 kB 94.33 kB +0.23% 28.86 kB 28.93 kB
oss-stable/react-art/cjs/react-art.production.min.js +0.32% 94.08 kB 94.38 kB +0.23% 28.89 kB 28.95 kB
oss-experimental/react-art/cjs/react-art.production.min.js +0.31% 95.59 kB 95.89 kB +0.23% 29.31 kB 29.38 kB
react-native/implementations/ReactFabric-dev.js +0.30% 848.55 kB 851.12 kB +0.29% 183.67 kB 184.21 kB
oss-stable-semver/react-art/umd/react-art.development.js +0.30% 903.75 kB 906.44 kB +0.29% 190.66 kB 191.22 kB
oss-stable/react-art/umd/react-art.development.js +0.30% 903.77 kB 906.46 kB +0.29% 190.68 kB 191.24 kB
react-native/implementations/ReactNativeRenderer-dev.js +0.30% 865.14 kB 867.71 kB +0.32% 188.30 kB 188.91 kB
oss-experimental/react-art/umd/react-art.development.js +0.29% 912.55 kB 915.24 kB +0.28% 192.21 kB 192.75 kB
react-native/implementations/ReactFabric-dev.fb.js +0.29% 885.40 kB 887.96 kB +0.29% 190.83 kB 191.38 kB
facebook-www/ReactART-dev.modern.js +0.29% 891.03 kB 893.58 kB +0.34% 189.29 kB 189.93 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js +0.28% 901.96 kB 904.53 kB +0.27% 195.48 kB 196.01 kB
facebook-www/ReactART-dev.classic.js +0.28% 902.22 kB 904.78 kB +0.32% 191.60 kB 192.21 kB
oss-stable-semver/react-art/umd/react-art.production.min.js +0.20% 131.34 kB 131.61 kB +0.16% 40.97 kB 41.03 kB
oss-stable/react-art/umd/react-art.production.min.js +0.20% 131.39 kB 131.65 kB +0.16% 40.99 kB 41.05 kB
oss-experimental/react-dom/cjs/react-dom-server.node.production.min.js = 60.48 kB 60.36 kB = 18.78 kB 18.75 kB
oss-experimental/react-dom/cjs/react-dom-static.node.production.min.js = 60.44 kB 60.32 kB = 18.77 kB 18.74 kB
oss-experimental/react-dom/cjs/react-dom-server.edge.production.min.js = 60.22 kB 60.10 kB = 18.71 kB 18.68 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.node.production.min.js = 60.14 kB 60.01 kB = 18.03 kB 18.00 kB
oss-stable/react-dom/cjs/react-dom-server.node.production.min.js = 60.09 kB 59.97 kB = 18.65 kB 18.62 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.production.min.js = 60.06 kB 59.94 kB = 18.62 kB 18.60 kB
oss-stable/react-dom/cjs/react-dom-server.edge.production.min.js = 59.83 kB 59.71 kB = 18.59 kB 18.56 kB
oss-stable-semver/react-dom/cjs/react-dom-server.edge.production.min.js = 59.80 kB 59.68 kB = 18.56 kB 18.54 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.node.production.min.js = 59.75 kB 59.62 kB = 17.90 kB 17.86 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.node.production.min.js = 59.72 kB 59.60 kB = 17.87 kB 17.84 kB
oss-experimental/react-dom/cjs/react-dom-server.bun.production.min.js = 59.11 kB 58.99 kB = 17.98 kB 17.95 kB
oss-stable/react-dom/cjs/react-dom-server.bun.production.min.js = 58.72 kB 58.60 kB = 17.85 kB 17.81 kB
oss-stable-semver/react-dom/cjs/react-dom-server.bun.production.min.js = 58.70 kB 58.58 kB = 17.82 kB 17.79 kB
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js = 56.35 kB 56.23 kB = 17.64 kB 17.61 kB
oss-experimental/react-dom/cjs/react-dom-static.edge.production.min.js = 56.26 kB 56.14 kB = 17.39 kB 17.36 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js = 56.20 kB 56.08 kB = 17.39 kB 17.36 kB
oss-experimental/react-dom/cjs/react-dom-static.browser.production.min.js = 56.08 kB 55.96 kB = 17.34 kB 17.31 kB
oss-stable/react-dom/umd/react-dom-server.browser.production.min.js = 56.02 kB 55.90 kB = 17.56 kB 17.52 kB
oss-stable-semver/react-dom/umd/react-dom-server.browser.production.min.js = 56.00 kB 55.88 kB = 17.53 kB 17.50 kB
oss-stable/react-dom/cjs/react-dom-server.browser.production.min.js = 55.87 kB 55.75 kB = 17.29 kB 17.26 kB
oss-stable-semver/react-dom/cjs/react-dom-server.browser.production.min.js = 55.85 kB 55.73 kB = 17.26 kB 17.23 kB
oss-experimental/react-dom/umd/react-dom-server-legacy.browser.production.min.js = 55.65 kB 55.53 kB = 16.81 kB 16.78 kB
oss-experimental/react-dom/cjs/react-dom-server-legacy.browser.production.min.js = 55.50 kB 55.38 kB = 16.53 kB 16.50 kB
oss-stable/react-dom/umd/react-dom-server-legacy.browser.production.min.js = 55.32 kB 55.20 kB = 16.69 kB 16.66 kB
oss-stable-semver/react-dom/umd/react-dom-server-legacy.browser.production.min.js = 55.30 kB 55.18 kB = 16.67 kB 16.64 kB
oss-stable/react-dom/cjs/react-dom-server-legacy.browser.production.min.js = 55.17 kB 55.05 kB = 16.42 kB 16.39 kB
oss-stable-semver/react-dom/cjs/react-dom-server-legacy.browser.production.min.js = 55.15 kB 55.03 kB = 16.40 kB 16.37 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.27 kB 29.15 kB = 10.02 kB 9.99 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.27 kB 29.15 kB = 10.02 kB 9.99 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.production.min.js = 29.27 kB 29.15 kB = 10.02 kB 9.99 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.03 kB 28.91 kB = 9.92 kB 9.89 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.03 kB 28.91 kB = 9.92 kB 9.89 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js = 29.03 kB 28.91 kB = 9.92 kB 9.89 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.39 kB 28.27 kB = 9.74 kB 9.71 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.39 kB 28.27 kB = 9.74 kB 9.71 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.edge.production.min.js = 28.39 kB 28.27 kB = 9.74 kB 9.71 kB
oss-experimental/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.31 kB 28.19 kB = 9.74 kB 9.70 kB
oss-stable-semver/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.31 kB 28.19 kB = 9.74 kB 9.70 kB
oss-stable/react-server-dom-webpack/umd/react-server-dom-webpack-server.browser.production.min.js = 28.31 kB 28.19 kB = 9.74 kB 9.70 kB
oss-experimental/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.11 kB 27.98 kB = 9.63 kB 9.60 kB
oss-stable-semver/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.11 kB 27.98 kB = 9.63 kB 9.60 kB
oss-stable/react-server-dom-webpack/cjs/react-server-dom-webpack-server.browser.production.min.js = 28.11 kB 27.98 kB = 9.63 kB 9.60 kB
oss-experimental/react-dom/unstable_server-external-runtime.js = 2.86 kB 2.80 kB = 1.29 kB 1.26 kB
oss-stable-semver/react-dom/unstable_server-external-runtime.js = 2.86 kB 2.80 kB = 1.29 kB 1.26 kB
oss-stable/react-dom/unstable_server-external-runtime.js = 2.86 kB 2.80 kB = 1.29 kB 1.26 kB

Generated by 🚫 dangerJS against 9e81f40

Implements waitForCommitToBeReady for resources.

currently it is only opted into when a special prop is passed. This will be removed in the next commit when I update all the tests that now require different mechanics to simulate resource loading.

The general approach is to track how many things we are waiting on and when we hit zero proceed with the commit. For Float CSS in particular we wait for all stylesheet preloads before inserting any uninserted stylesheets. When all the stylesheets have loaded we continue the commit as usual.
@gnoff gnoff marked this pull request as ready for review March 23, 2023 17:36
const NotLoaded = /* */ 0b00;
const Loaded = /* */ 0b01;
const Errored = /* */ 0b10;
const Settled = /* */ 0b11;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Seems like this should just be an enum instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm rethinking this part and will take another pass in a follow up PR.

I added another state Inserted in a recent refactor so I'll leave as a bitmask for now. I think I want to actually rework the whole thing to use something like a thenable with status embedded. I was thinking for some reason that the load event handlers might run sync sometimes but I'm pretty sure that's just wrong and they'll always just be in a separate task so using a thenable could actually have the commit happen sooner in a microtask

Copy link
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

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

Just a few nits but overall looks good to me once you get the tests passing

@gnoff gnoff merged commit 73b6435 into facebook:main Mar 25, 2023
@gnoff gnoff deleted the suspensey-css branch March 25, 2023 02:17
github-actions bot pushed a commit that referenced this pull request Mar 25, 2023
…ces (#26450)

Before a commit is finished if any new stylesheet resources are going to
mount and we are capable of delaying the commit we will do the following

1. Wait for all preloads for newly created stylesheet resources to load
2. Once all preloads are finished we insert the stylesheet instances for
these resources and wait for them all to load
3. Once all stylesheets have loaded we complete the commit

In this PR I also removed the synchronous loadingstate tracking in the
fizz runtime. It was not necessary to support the implementation on not
used by the fizz runtime itself. It makes the inline script slightly
smaller

In this PR I also integrated ReactDOMFloatClient with
ReactDOMHostConfig. It leads to better code factoring, something I
already did on the server a while back. To make the diff a little easier
to follow i make these changes in a single commit so you can look at the
change after that commit if helpful

There is a 500ms timeout which will finish the commit even if all
suspended host instances have not finished loading yet

At the moment error and load events are treated the same and we're
really tracking whether the host instance is finished attempting to
load.

DiffTrain build for [73b6435](73b6435)
acdlite added a commit to acdlite/react that referenced this pull request Mar 26, 2023
Follow up to facebook#26450. In `acquireResource`, if a stylesheet resource
already has an instance, we need to confirm that it was inserted into
the document, because it may have been suspended. This happens because
stylesheet resources are assigned a resource before committing, inside
`suspendResource`. Probably a factoring a smell.

As currently implemented, the idea is that `suspendResource` does all
the same stuff as `acquireResource` except for the insertion.
acdlite added a commit to acdlite/react that referenced this pull request Mar 26, 2023
Follow up to facebook#26450. In the complete phase of HostHoistable, it should
call suspendResource instead of suspenseInstance. I refactored the
code a bit to make the branching more clear.

There's a test case that covers this but it's currently gated behind
a TODO because of another issue, which I'll fix in the next step.
acdlite added a commit to acdlite/react that referenced this pull request Mar 26, 2023
Follow up to facebook#26450. In the complete phase of HostHoistable, it should
call suspendResource instead of suspenseInstance. I refactored the
code a bit to make the branching more clear.

There's a test case that covers this but it's currently gated behind
a TODO because of another issue, which I'll fix in the next step.
acdlite added a commit to acdlite/react that referenced this pull request Mar 26, 2023
In facebook#26450, @gnoff wrote a test for a suspensey stylesheet update that
gets interrupted. It was broken because of behavior that wasn't
implemented yet, but has now been fixed by my previous commits.

I re-enabled the test and added some comments. There was one assertion
that was slightly wrong and I fixed that too.
acdlite added a commit that referenced this pull request Mar 27, 2023
Prerendering a tree (i.e. with Offscreen) should not suspend the commit
phase, because the content is not yet visible. However, when revealing a
prerendered tree, we should suspend the commit phase if resources in the
prerendered tree haven't finished loading yet.

To do this properly, we need to visit all the visible nodes in the tree
that might possibly suspend. This includes nodes in the current tree,
because even though they were already "mounted", the resources might not
have loaded yet, because we didn't suspend when it was prerendered.

We will need to add this capability to the Offscreen component's
"manual" mode, too. Something like a `ready()` method that returns a
promise that resolves when the tree has fully loaded.

Also includes some fixes to #26450. See PR for details.
github-actions bot pushed a commit that referenced this pull request Mar 27, 2023
Prerendering a tree (i.e. with Offscreen) should not suspend the commit
phase, because the content is not yet visible. However, when revealing a
prerendered tree, we should suspend the commit phase if resources in the
prerendered tree haven't finished loading yet.

To do this properly, we need to visit all the visible nodes in the tree
that might possibly suspend. This includes nodes in the current tree,
because even though they were already "mounted", the resources might not
have loaded yet, because we didn't suspend when it was prerendered.

We will need to add this capability to the Offscreen component's
"manual" mode, too. Something like a `ready()` method that returns a
promise that resolves when the tree has fully loaded.

Also includes some fixes to #26450. See PR for details.

DiffTrain build for [768f965](768f965)
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Apr 11, 2023
Summary:
This sync includes the following changes:
- **[ca01f359b](facebook/react@ca01f359b )**: Remove skipUnmountedBoundaries ([#26489](facebook/react#26489)) //<Ricky>//
- **[43a70a610](facebook/react@43a70a610 )**: Limit the meaning of "custom element" to not include `is` ([#26524](facebook/react#26524)) //<Sebastian Markbåge>//
- **[1308e49a6](facebook/react@1308e49a6 )**: [Flight Plugin] Scan for "use client" ([#26474](facebook/react#26474)) //<dan>//
- **[1a1d61fed](facebook/react@1a1d61fed )**: Warn for ARIA typos on custom elements ([#26523](facebook/react#26523)) //<Sebastian Markbåge>//
- **[73deff0d5](facebook/react@73deff0d5 )**: Refactor DOMProperty and CSSProperty ([#26513](facebook/react#26513)) //<Sebastian Markbåge>//
- **[2d51251e6](facebook/react@2d51251e6 )**: Clean up deferRenderPhaseUpdateToNextBatch ([#26511](facebook/react#26511)) //<Andrew Clark>//
- **[0ffc7f632](facebook/react@0ffc7f632 )**: Update useMemoCache test to confirm that cache persists across errors ([#26510](facebook/react#26510)) //<Joseph Savona>//
- **[29a3be78b](facebook/react@29a3be78b )**: Move ReactDOMFloat to react-dom/src/ ([#26514](facebook/react#26514)) //<Sebastian Markbåge>//
- **[4c2fc0190](facebook/react@4c2fc0190 )**: Generate safe javascript url instead of throwing with disableJavaScriptURLs is on ([#26507](facebook/react#26507)) //<Sebastian Markbåge>//
- **[f0aafa1a7](facebook/react@f0aafa1a7 )**: Convert a few more tests to waitFor test helpers ([#26509](facebook/react#26509)) //<Andrew Clark>//
- **[90995ef8b](facebook/react@90995ef8b )**: Delete "triangle" resuming fuzz tester ([#26508](facebook/react#26508)) //<Andrew Clark>//
- **[f118b7ceb](facebook/react@f118b7ceb )**: [Flight] Gated test for dropped transport of undefined object values ([#26478](facebook/react#26478)) //<Sebastian Silbermann>//
- **[fd0511c72](facebook/react@fd0511c72 )**: [Flight] Add support BigInt support ([#26479](facebook/react#26479)) //<Sebastian Silbermann>//
- **[85de6fde5](facebook/react@85de6fde5 )**: Refactor DOM special cases per tags including controlled fields ([#26501](facebook/react#26501)) //<Sebastian Markbåge>//
- **[1f5cdf8c7](facebook/react@1f5cdf8c7 )**: Update Suspense fuzz tests to use `act` ([#26498](facebook/react#26498)) //<Andrew Clark>//
- **[f62cb39ee](facebook/react@f62cb39ee )**: Make disableSchedulerTimeoutInWorkLoop a static ff ([#26497](facebook/react#26497)) //<Ricky>//
- **[41b4714f1](facebook/react@41b4714f1 )**: Remove disableNativeComponentFrames ([#26490](facebook/react#26490)) //<Ricky>//
- **[fc90eb636](facebook/react@fc90eb636 )**: Codemod more tests to waitFor pattern ([#26494](facebook/react#26494)) //<Andrew Clark>//
- **[e0bbc2662](facebook/react@e0bbc2662 )**: Improve tests that deal with microtasks ([#26493](facebook/react#26493)) //<Andrew Clark>//
- **[8faf75193](facebook/react@8faf75193 )**: Codemod some expiration tests to waitForExpired ([#26491](facebook/react#26491)) //<Andrew Clark>//
- **[8342a0992](facebook/react@8342a0992 )**: Remove unused feature flag disableSchedulerTimeoutBasedOnReactExpirationTime ([#26488](facebook/react#26488)) //<Jan Kassens>//
- **[afea1d0c5](facebook/react@afea1d0c5 )**: [flow] make Flow suppressions explicit on the error ([#26487](facebook/react#26487)) //<Jan Kassens>//
- **[768f965de](facebook/react@768f965de )**: Suspensily committing a prerendered tree ([#26434](facebook/react#26434)) //<Andrew Clark>//
- **[d12bdcda6](facebook/react@d12bdcda6 )**: Fix Flow types of useEffectEvent ([#26468](facebook/react#26468)) //<Sebastian Silbermann>//
- **[73b6435ca](facebook/react@73b6435ca )**: [Float][Fiber] Implement waitForCommitToBeReady for stylesheet resources ([#26450](facebook/react#26450)) //<Josh Story>//
- **[175962c10](facebook/react@175962c10 )**: Fix remaining CommonJS imports after Rollup upgrade ([#26473](facebook/react#26473)) //<dan>//
- **[909c6dacf](facebook/react@909c6dacf )**: Update Rollup to 3.x ([#26442](facebook/react#26442)) //<Mark Erikson>//
- **[9c54b29b4](facebook/react@9c54b29b4 )**: Remove ReactFabricPublicInstance and used definition from ReactNativePrivateInterface ([#26437](facebook/react#26437)) //<Rubén Norte>//
- **[f77099b6f](facebook/react@f77099b6f )**: Remove layout effect warning on the server ([#26395](facebook/react#26395)) //<Ricky>//
- **[51a7c45f8](facebook/react@51a7c45f8 )**: Bugfix: SuspenseList incorrectly forces a fallback ([#26453](facebook/react#26453)) //<Andrew Clark>//
- **[afb3d51dc](facebook/react@afb3d51dc )**: Fix enableClientRenderFallbackOnTextMismatch flag ([#26457](facebook/react#26457)) //<Sebastian Markbåge>//
- **[8e17bfd14](facebook/react@8e17bfd14 )**: Make InternalInstanceHandle type opaque in ReactNativeTypes ([#26461](facebook/react#26461)) //<Rubén Norte>//
- **[b93b4f074](facebook/react@b93b4f074 )**: Should not throw for children of iframe or object ([#26458](facebook/react#26458)) //<Sebastian Markbåge>//
- **[c0b34bc5f](facebook/react@c0b34bc5f )**: chore: update links of docs and api ([#26455](facebook/react#26455)) //<Leedom>//
- **[ffb6733ee](facebook/react@ffb6733ee )**: fix docs link for useSyncExternalStore ([#26452](facebook/react#26452)) //<Valor(华洛)>//
- **[12a1d140e](facebook/react@12a1d140e )**: Don't prerender siblings of suspended component  ([#26380](facebook/react#26380)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 77ba161...ca01f35

jest_e2e[run_all_tests]

bypass-github-export-checks

Reviewed By: sammy-SC

Differential Revision: D44669450

fbshipit-source-id: f160aad4719a00df3ceeca78d5f3fcd0aa0f8437
jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
Summary:
This sync includes the following changes:
- **[ca01f359b](facebook/react@ca01f359b )**: Remove skipUnmountedBoundaries ([facebook#26489](facebook/react#26489)) //<Ricky>//
- **[43a70a610](facebook/react@43a70a610 )**: Limit the meaning of "custom element" to not include `is` ([facebook#26524](facebook/react#26524)) //<Sebastian Markbåge>//
- **[1308e49a6](facebook/react@1308e49a6 )**: [Flight Plugin] Scan for "use client" ([facebook#26474](facebook/react#26474)) //<dan>//
- **[1a1d61fed](facebook/react@1a1d61fed )**: Warn for ARIA typos on custom elements ([facebook#26523](facebook/react#26523)) //<Sebastian Markbåge>//
- **[73deff0d5](facebook/react@73deff0d5 )**: Refactor DOMProperty and CSSProperty ([facebook#26513](facebook/react#26513)) //<Sebastian Markbåge>//
- **[2d51251e6](facebook/react@2d51251e6 )**: Clean up deferRenderPhaseUpdateToNextBatch ([facebook#26511](facebook/react#26511)) //<Andrew Clark>//
- **[0ffc7f632](facebook/react@0ffc7f632 )**: Update useMemoCache test to confirm that cache persists across errors ([facebook#26510](facebook/react#26510)) //<Joseph Savona>//
- **[29a3be78b](facebook/react@29a3be78b )**: Move ReactDOMFloat to react-dom/src/ ([facebook#26514](facebook/react#26514)) //<Sebastian Markbåge>//
- **[4c2fc0190](facebook/react@4c2fc0190 )**: Generate safe javascript url instead of throwing with disableJavaScriptURLs is on ([facebook#26507](facebook/react#26507)) //<Sebastian Markbåge>//
- **[f0aafa1a7](facebook/react@f0aafa1a7 )**: Convert a few more tests to waitFor test helpers ([facebook#26509](facebook/react#26509)) //<Andrew Clark>//
- **[90995ef8b](facebook/react@90995ef8b )**: Delete "triangle" resuming fuzz tester ([facebook#26508](facebook/react#26508)) //<Andrew Clark>//
- **[f118b7ceb](facebook/react@f118b7ceb )**: [Flight] Gated test for dropped transport of undefined object values ([facebook#26478](facebook/react#26478)) //<Sebastian Silbermann>//
- **[fd0511c72](facebook/react@fd0511c72 )**: [Flight] Add support BigInt support ([facebook#26479](facebook/react#26479)) //<Sebastian Silbermann>//
- **[85de6fde5](facebook/react@85de6fde5 )**: Refactor DOM special cases per tags including controlled fields ([facebook#26501](facebook/react#26501)) //<Sebastian Markbåge>//
- **[1f5cdf8c7](facebook/react@1f5cdf8c7 )**: Update Suspense fuzz tests to use `act` ([facebook#26498](facebook/react#26498)) //<Andrew Clark>//
- **[f62cb39ee](facebook/react@f62cb39ee )**: Make disableSchedulerTimeoutInWorkLoop a static ff ([facebook#26497](facebook/react#26497)) //<Ricky>//
- **[41b4714f1](facebook/react@41b4714f1 )**: Remove disableNativeComponentFrames ([facebook#26490](facebook/react#26490)) //<Ricky>//
- **[fc90eb636](facebook/react@fc90eb636 )**: Codemod more tests to waitFor pattern ([facebook#26494](facebook/react#26494)) //<Andrew Clark>//
- **[e0bbc2662](facebook/react@e0bbc2662 )**: Improve tests that deal with microtasks ([facebook#26493](facebook/react#26493)) //<Andrew Clark>//
- **[8faf75193](facebook/react@8faf75193 )**: Codemod some expiration tests to waitForExpired ([facebook#26491](facebook/react#26491)) //<Andrew Clark>//
- **[8342a0992](facebook/react@8342a0992 )**: Remove unused feature flag disableSchedulerTimeoutBasedOnReactExpirationTime ([facebook#26488](facebook/react#26488)) //<Jan Kassens>//
- **[afea1d0c5](facebook/react@afea1d0c5 )**: [flow] make Flow suppressions explicit on the error ([facebook#26487](facebook/react#26487)) //<Jan Kassens>//
- **[768f965de](facebook/react@768f965de )**: Suspensily committing a prerendered tree ([facebook#26434](facebook/react#26434)) //<Andrew Clark>//
- **[d12bdcda6](facebook/react@d12bdcda6 )**: Fix Flow types of useEffectEvent ([facebook#26468](facebook/react#26468)) //<Sebastian Silbermann>//
- **[73b6435ca](facebook/react@73b6435ca )**: [Float][Fiber] Implement waitForCommitToBeReady for stylesheet resources ([facebook#26450](facebook/react#26450)) //<Josh Story>//
- **[175962c10](facebook/react@175962c10 )**: Fix remaining CommonJS imports after Rollup upgrade ([facebook#26473](facebook/react#26473)) //<dan>//
- **[909c6dacf](facebook/react@909c6dacf )**: Update Rollup to 3.x ([facebook#26442](facebook/react#26442)) //<Mark Erikson>//
- **[9c54b29b4](facebook/react@9c54b29b4 )**: Remove ReactFabricPublicInstance and used definition from ReactNativePrivateInterface ([facebook#26437](facebook/react#26437)) //<Rubén Norte>//
- **[f77099b6f](facebook/react@f77099b6f )**: Remove layout effect warning on the server ([facebook#26395](facebook/react#26395)) //<Ricky>//
- **[51a7c45f8](facebook/react@51a7c45f8 )**: Bugfix: SuspenseList incorrectly forces a fallback ([facebook#26453](facebook/react#26453)) //<Andrew Clark>//
- **[afb3d51dc](facebook/react@afb3d51dc )**: Fix enableClientRenderFallbackOnTextMismatch flag ([facebook#26457](facebook/react#26457)) //<Sebastian Markbåge>//
- **[8e17bfd14](facebook/react@8e17bfd14 )**: Make InternalInstanceHandle type opaque in ReactNativeTypes ([facebook#26461](facebook/react#26461)) //<Rubén Norte>//
- **[b93b4f074](facebook/react@b93b4f074 )**: Should not throw for children of iframe or object ([facebook#26458](facebook/react#26458)) //<Sebastian Markbåge>//
- **[c0b34bc5f](facebook/react@c0b34bc5f )**: chore: update links of docs and api ([facebook#26455](facebook/react#26455)) //<Leedom>//
- **[ffb6733ee](facebook/react@ffb6733ee )**: fix docs link for useSyncExternalStore ([facebook#26452](facebook/react#26452)) //<Valor(华洛)>//
- **[12a1d140e](facebook/react@12a1d140e )**: Don't prerender siblings of suspended component  ([facebook#26380](facebook/react#26380)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 77ba161...ca01f35

jest_e2e[run_all_tests]

bypass-github-export-checks

Reviewed By: sammy-SC

Differential Revision: D44669450

fbshipit-source-id: f160aad4719a00df3ceeca78d5f3fcd0aa0f8437
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
This sync includes the following changes:
- **[ca01f359b](facebook/react@ca01f359b )**: Remove skipUnmountedBoundaries ([facebook#26489](facebook/react#26489)) //<Ricky>//
- **[43a70a610](facebook/react@43a70a610 )**: Limit the meaning of "custom element" to not include `is` ([facebook#26524](facebook/react#26524)) //<Sebastian Markbåge>//
- **[1308e49a6](facebook/react@1308e49a6 )**: [Flight Plugin] Scan for "use client" ([facebook#26474](facebook/react#26474)) //<dan>//
- **[1a1d61fed](facebook/react@1a1d61fed )**: Warn for ARIA typos on custom elements ([facebook#26523](facebook/react#26523)) //<Sebastian Markbåge>//
- **[73deff0d5](facebook/react@73deff0d5 )**: Refactor DOMProperty and CSSProperty ([facebook#26513](facebook/react#26513)) //<Sebastian Markbåge>//
- **[2d51251e6](facebook/react@2d51251e6 )**: Clean up deferRenderPhaseUpdateToNextBatch ([facebook#26511](facebook/react#26511)) //<Andrew Clark>//
- **[0ffc7f632](facebook/react@0ffc7f632 )**: Update useMemoCache test to confirm that cache persists across errors ([facebook#26510](facebook/react#26510)) //<Joseph Savona>//
- **[29a3be78b](facebook/react@29a3be78b )**: Move ReactDOMFloat to react-dom/src/ ([facebook#26514](facebook/react#26514)) //<Sebastian Markbåge>//
- **[4c2fc0190](facebook/react@4c2fc0190 )**: Generate safe javascript url instead of throwing with disableJavaScriptURLs is on ([facebook#26507](facebook/react#26507)) //<Sebastian Markbåge>//
- **[f0aafa1a7](facebook/react@f0aafa1a7 )**: Convert a few more tests to waitFor test helpers ([facebook#26509](facebook/react#26509)) //<Andrew Clark>//
- **[90995ef8b](facebook/react@90995ef8b )**: Delete "triangle" resuming fuzz tester ([facebook#26508](facebook/react#26508)) //<Andrew Clark>//
- **[f118b7ceb](facebook/react@f118b7ceb )**: [Flight] Gated test for dropped transport of undefined object values ([facebook#26478](facebook/react#26478)) //<Sebastian Silbermann>//
- **[fd0511c72](facebook/react@fd0511c72 )**: [Flight] Add support BigInt support ([facebook#26479](facebook/react#26479)) //<Sebastian Silbermann>//
- **[85de6fde5](facebook/react@85de6fde5 )**: Refactor DOM special cases per tags including controlled fields ([facebook#26501](facebook/react#26501)) //<Sebastian Markbåge>//
- **[1f5cdf8c7](facebook/react@1f5cdf8c7 )**: Update Suspense fuzz tests to use `act` ([facebook#26498](facebook/react#26498)) //<Andrew Clark>//
- **[f62cb39ee](facebook/react@f62cb39ee )**: Make disableSchedulerTimeoutInWorkLoop a static ff ([facebook#26497](facebook/react#26497)) //<Ricky>//
- **[41b4714f1](facebook/react@41b4714f1 )**: Remove disableNativeComponentFrames ([facebook#26490](facebook/react#26490)) //<Ricky>//
- **[fc90eb636](facebook/react@fc90eb636 )**: Codemod more tests to waitFor pattern ([facebook#26494](facebook/react#26494)) //<Andrew Clark>//
- **[e0bbc2662](facebook/react@e0bbc2662 )**: Improve tests that deal with microtasks ([facebook#26493](facebook/react#26493)) //<Andrew Clark>//
- **[8faf75193](facebook/react@8faf75193 )**: Codemod some expiration tests to waitForExpired ([facebook#26491](facebook/react#26491)) //<Andrew Clark>//
- **[8342a0992](facebook/react@8342a0992 )**: Remove unused feature flag disableSchedulerTimeoutBasedOnReactExpirationTime ([facebook#26488](facebook/react#26488)) //<Jan Kassens>//
- **[afea1d0c5](facebook/react@afea1d0c5 )**: [flow] make Flow suppressions explicit on the error ([facebook#26487](facebook/react#26487)) //<Jan Kassens>//
- **[768f965de](facebook/react@768f965de )**: Suspensily committing a prerendered tree ([facebook#26434](facebook/react#26434)) //<Andrew Clark>//
- **[d12bdcda6](facebook/react@d12bdcda6 )**: Fix Flow types of useEffectEvent ([facebook#26468](facebook/react#26468)) //<Sebastian Silbermann>//
- **[73b6435ca](facebook/react@73b6435ca )**: [Float][Fiber] Implement waitForCommitToBeReady for stylesheet resources ([facebook#26450](facebook/react#26450)) //<Josh Story>//
- **[175962c10](facebook/react@175962c10 )**: Fix remaining CommonJS imports after Rollup upgrade ([facebook#26473](facebook/react#26473)) //<dan>//
- **[909c6dacf](facebook/react@909c6dacf )**: Update Rollup to 3.x ([facebook#26442](facebook/react#26442)) //<Mark Erikson>//
- **[9c54b29b4](facebook/react@9c54b29b4 )**: Remove ReactFabricPublicInstance and used definition from ReactNativePrivateInterface ([facebook#26437](facebook/react#26437)) //<Rubén Norte>//
- **[f77099b6f](facebook/react@f77099b6f )**: Remove layout effect warning on the server ([facebook#26395](facebook/react#26395)) //<Ricky>//
- **[51a7c45f8](facebook/react@51a7c45f8 )**: Bugfix: SuspenseList incorrectly forces a fallback ([facebook#26453](facebook/react#26453)) //<Andrew Clark>//
- **[afb3d51dc](facebook/react@afb3d51dc )**: Fix enableClientRenderFallbackOnTextMismatch flag ([facebook#26457](facebook/react#26457)) //<Sebastian Markbåge>//
- **[8e17bfd14](facebook/react@8e17bfd14 )**: Make InternalInstanceHandle type opaque in ReactNativeTypes ([facebook#26461](facebook/react#26461)) //<Rubén Norte>//
- **[b93b4f074](facebook/react@b93b4f074 )**: Should not throw for children of iframe or object ([facebook#26458](facebook/react#26458)) //<Sebastian Markbåge>//
- **[c0b34bc5f](facebook/react@c0b34bc5f )**: chore: update links of docs and api ([facebook#26455](facebook/react#26455)) //<Leedom>//
- **[ffb6733ee](facebook/react@ffb6733ee )**: fix docs link for useSyncExternalStore ([facebook#26452](facebook/react#26452)) //<Valor(华洛)>//
- **[12a1d140e](facebook/react@12a1d140e )**: Don't prerender siblings of suspended component  ([facebook#26380](facebook/react#26380)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 77ba161...ca01f35

jest_e2e[run_all_tests]

bypass-github-export-checks

Reviewed By: sammy-SC

Differential Revision: D44669450

fbshipit-source-id: f160aad4719a00df3ceeca78d5f3fcd0aa0f8437
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
…ces (#26450)

Before a commit is finished if any new stylesheet resources are going to
mount and we are capable of delaying the commit we will do the following

1. Wait for all preloads for newly created stylesheet resources to load
2. Once all preloads are finished we insert the stylesheet instances for
these resources and wait for them all to load
3. Once all stylesheets have loaded we complete the commit

In this PR I also removed the synchronous loadingstate tracking in the
fizz runtime. It was not necessary to support the implementation on not
used by the fizz runtime itself. It makes the inline script slightly
smaller

In this PR I also integrated ReactDOMFloatClient with
ReactDOMHostConfig. It leads to better code factoring, something I
already did on the server a while back. To make the diff a little easier
to follow i make these changes in a single commit so you can look at the
change after that commit if helpful

There is a 500ms timeout which will finish the commit even if all
suspended host instances have not finished loading yet

At the moment error and load events are treated the same and we're
really tracking whether the host instance is finished attempting to
load.

DiffTrain build for commit 73b6435.
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
Prerendering a tree (i.e. with Offscreen) should not suspend the commit
phase, because the content is not yet visible. However, when revealing a
prerendered tree, we should suspend the commit phase if resources in the
prerendered tree haven't finished loading yet.

To do this properly, we need to visit all the visible nodes in the tree
that might possibly suspend. This includes nodes in the current tree,
because even though they were already "mounted", the resources might not
have loaded yet, because we didn't suspend when it was prerendered.

We will need to add this capability to the Offscreen component's
"manual" mode, too. Something like a `ready()` method that returns a
promise that resolves when the tree has fully loaded.

Also includes some fixes to #26450. See PR for details.

DiffTrain build for commit 768f965.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants