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

Unify Default and Sync lane #25524

Closed
wants to merge 12 commits into from

Conversation

tyao1
Copy link
Contributor

@tyao1 tyao1 commented Oct 20, 2022

Summary

Resubmitted #25438

We want to unify DefaultLane, SyncLane, and ContinuousLane into just SyncLane, and use a separate field on the root to track whether they should be scheduled with queueMicrotask, requestAnimationFrame, or completely synchronously (in the case of flushSync).
This PR is for unifying DefaultLane and SyncLane.

The main change is that EventPriorities no longer strictly maps to Lane. Instead, it also contains extra bits for UpdateType, so that we can distinguish DefaultUpdate from DiscreteUpdate since now they both are on the sync lane.

TODOs:
[ ] Fix remaining tests
[ ] Resolve TODO in the code

How did you test this change?

yarn test

@tyao1 tyao1 requested a review from acdlite October 20, 2022 18:00
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Oct 20, 2022
@sizebot
Copy link

sizebot commented Oct 25, 2022

Comparing: aa9988e...a9537b1

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 +0.30% 135.47 kB 135.87 kB +0.33% 43.44 kB 43.58 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.75% 148.01 kB 149.12 kB +0.67% 47.33 kB 47.65 kB
facebook-www/ReactDOM-prod.classic.js +0.90% 492.51 kB 496.97 kB +0.99% 87.52 kB 88.39 kB
facebook-www/ReactDOM-prod.modern.js +0.94% 477.80 kB 482.27 kB +1.07% 85.29 kB 86.20 kB
facebook-www/ReactDOMForked-prod.classic.js +0.90% 492.51 kB 496.97 kB +0.99% 87.52 kB 88.39 kB
oss-experimental/jest-react/cjs/jest-react.production.min.js +3.43% 2.42 kB 2.50 kB +2.82% 1.17 kB 1.20 kB
oss-stable-semver/jest-react/cjs/jest-react.production.min.js +3.43% 2.42 kB 2.50 kB +2.82% 1.17 kB 1.20 kB
oss-stable/jest-react/cjs/jest-react.production.min.js +3.43% 2.42 kB 2.50 kB +2.82% 1.17 kB 1.20 kB
oss-experimental/react-reconciler/cjs/react-reconciler-constants.development.js = 1.05 kB 0.96 kB = 0.44 kB 0.43 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-constants.development.js = 1.05 kB 0.96 kB = 0.44 kB 0.43 kB
oss-stable/react-reconciler/cjs/react-reconciler-constants.development.js = 1.05 kB 0.96 kB = 0.44 kB 0.43 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/jest-react/cjs/jest-react.production.min.js +3.43% 2.42 kB 2.50 kB +2.82% 1.17 kB 1.20 kB
oss-stable-semver/jest-react/cjs/jest-react.production.min.js +3.43% 2.42 kB 2.50 kB +2.82% 1.17 kB 1.20 kB
oss-stable/jest-react/cjs/jest-react.production.min.js +3.43% 2.42 kB 2.50 kB +2.82% 1.17 kB 1.20 kB
facebook-www/ReactIs-dev.modern.js +1.50% 9.62 kB 9.77 kB +1.10% 2.54 kB 2.57 kB
facebook-www/ReactIs-dev.classic.js +1.50% 9.62 kB 9.77 kB +1.10% 2.54 kB 2.57 kB
oss-experimental/jest-react/cjs/jest-react.development.js +1.22% 10.65 kB 10.78 kB +1.09% 3.76 kB 3.80 kB
oss-stable-semver/jest-react/cjs/jest-react.development.js +1.22% 10.65 kB 10.78 kB +1.09% 3.76 kB 3.80 kB
oss-stable/jest-react/cjs/jest-react.development.js +1.22% 10.65 kB 10.78 kB +1.09% 3.76 kB 3.80 kB
facebook-www/ReactDOM-prod.modern.js +0.94% 477.80 kB 482.27 kB +1.07% 85.29 kB 86.20 kB
facebook-www/ReactDOMForked-prod.modern.js +0.94% 477.80 kB 482.27 kB +1.07% 85.29 kB 86.21 kB
facebook-www/ReactDOM-prod.classic.js +0.90% 492.51 kB 496.97 kB +0.99% 87.52 kB 88.39 kB
facebook-www/ReactDOMForked-prod.classic.js +0.90% 492.51 kB 496.97 kB +0.99% 87.52 kB 88.39 kB
facebook-www/ReactDOM-profiling.modern.js +0.89% 507.61 kB 512.12 kB +1.02% 89.80 kB 90.71 kB
facebook-www/ReactDOMForked-profiling.modern.js +0.89% 507.61 kB 512.12 kB +1.02% 89.80 kB 90.71 kB
facebook-www/ReactDOM-profiling.classic.js +0.86% 522.39 kB 526.89 kB +0.90% 92.13 kB 92.96 kB
facebook-www/ReactDOMForked-profiling.classic.js +0.86% 522.39 kB 526.89 kB +0.90% 92.13 kB 92.96 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.min.js +0.76% 146.57 kB 147.68 kB +0.70% 47.13 kB 47.46 kB
facebook-www/ReactART-prod.modern.js +0.76% 319.00 kB 321.42 kB +0.99% 54.46 kB 55.00 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js +0.75% 148.01 kB 149.12 kB +0.67% 47.33 kB 47.65 kB
facebook-www/ReactART-dev.modern.js +0.74% 853.86 kB 860.20 kB +0.68% 179.85 kB 181.07 kB
facebook-www/ReactART-dev.classic.js +0.73% 864.18 kB 870.52 kB +0.65% 181.93 kB 183.11 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.production.min.js +0.73% 12.51 kB 12.60 kB +0.83% 3.73 kB 3.76 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.production.min.js +0.73% 12.51 kB 12.60 kB +0.83% 3.73 kB 3.76 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.production.min.js +0.73% 12.51 kB 12.60 kB +0.83% 3.73 kB 3.76 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +0.72% 12.58 kB 12.67 kB +0.85% 3.75 kB 3.78 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +0.72% 12.58 kB 12.67 kB +0.85% 3.75 kB 3.78 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.production.min.js +0.72% 12.58 kB 12.67 kB +0.85% 3.75 kB 3.78 kB
facebook-www/ReactART-prod.classic.js +0.72% 329.79 kB 332.17 kB +0.92% 56.26 kB 56.78 kB
oss-experimental/react-dom/cjs/react-dom.profiling.min.js +0.69% 157.49 kB 158.58 kB +0.65% 49.80 kB 50.13 kB
oss-experimental/react-dom/umd/react-dom.production.min.js +0.65% 148.00 kB 148.97 kB +0.69% 48.03 kB 48.36 kB
facebook-www/ReactDOMForked-dev.modern.js +0.65% 1,229.06 kB 1,237.01 kB +0.58% 268.34 kB 269.90 kB
facebook-www/ReactDOM-dev.modern.js +0.65% 1,229.06 kB 1,237.01 kB +0.58% 268.34 kB 269.90 kB
facebook-www/ReactDOMForked-dev.classic.js +0.63% 1,252.91 kB 1,260.86 kB +0.58% 272.86 kB 274.43 kB
facebook-www/ReactDOM-dev.classic.js +0.63% 1,252.91 kB 1,260.86 kB +0.58% 272.86 kB 274.43 kB
oss-experimental/react-reconciler/cjs/react-reconciler.production.min.js +0.63% 104.29 kB 104.94 kB +0.73% 31.83 kB 32.06 kB
oss-experimental/react-dom/umd/react-dom.profiling.min.js +0.60% 156.81 kB 157.75 kB +0.71% 50.31 kB 50.66 kB
oss-experimental/react-reconciler/cjs/react-reconciler.profiling.min.js +0.56% 113.14 kB 113.77 kB +0.71% 33.98 kB 34.22 kB
oss-experimental/react-reconciler/cjs/react-reconciler.development.js +0.54% 830.70 kB 835.22 kB +0.53% 175.89 kB 176.82 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.development.js +0.51% 1,094.06 kB 1,099.59 kB +0.48% 244.39 kB 245.56 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js +0.49% 280.80 kB 282.16 kB +0.45% 49.73 kB 49.95 kB
oss-experimental/react-dom/cjs/react-dom.development.js +0.49% 1,153.60 kB 1,159.21 kB +0.46% 256.61 kB 257.79 kB
oss-experimental/react-dom/umd/react-dom.development.js +0.48% 1,209.89 kB 1,215.67 kB +0.45% 259.35 kB 260.53 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.development.js +0.47% 786.27 kB 789.96 kB +0.46% 167.26 kB 168.03 kB
oss-stable/react-reconciler/cjs/react-reconciler.development.js +0.47% 786.30 kB 789.98 kB +0.46% 167.28 kB 168.06 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js +0.46% 296.38 kB 297.74 kB +0.42% 52.09 kB 52.31 kB
react-native/implementations/ReactFabric-dev.js +0.44% 812.53 kB 816.13 kB +0.41% 176.20 kB 176.93 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-dev.js +0.44% 734.35 kB 737.59 kB +0.39% 157.42 kB 158.03 kB
facebook-www/ReactTestRenderer-dev.modern.js +0.44% 756.39 kB 759.71 kB +0.40% 161.51 kB 162.16 kB
facebook-www/ReactTestRenderer-dev.classic.js +0.44% 756.39 kB 759.71 kB +0.40% 161.51 kB 162.16 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.production.min.js +0.43% 96.80 kB 97.22 kB +0.52% 29.74 kB 29.90 kB
oss-stable/react-reconciler/cjs/react-reconciler.production.min.js +0.43% 96.83 kB 97.24 kB +0.52% 29.76 kB 29.92 kB
react-native/implementations/ReactNativeRenderer-dev.js +0.42% 822.05 kB 825.50 kB +0.40% 178.76 kB 179.48 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.development.js +0.42% 691.48 kB 694.36 kB +0.40% 150.21 kB 150.80 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.development.js +0.42% 691.51 kB 694.38 kB +0.40% 150.23 kB 150.83 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.development.js +0.41% 724.25 kB 727.25 kB +0.40% 151.76 kB 152.37 kB
oss-stable/react-test-renderer/umd/react-test-renderer.development.js +0.41% 724.28 kB 727.27 kB +0.40% 151.78 kB 152.39 kB
react-native/implementations/ReactFabric-prod.js +0.41% 308.86 kB 310.13 kB +0.36% 54.70 kB 54.89 kB
react-native/implementations/ReactFabric-dev.fb.js +0.41% 850.74 kB 854.22 kB +0.40% 182.94 kB 183.67 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.development.js +0.41% 720.36 kB 723.30 kB +0.40% 155.93 kB 156.55 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.development.js +0.41% 754.58 kB 757.64 kB +0.39% 157.54 kB 158.16 kB
oss-stable-semver/react-art/cjs/react-art.development.js +0.40% 718.67 kB 721.56 kB +0.40% 155.03 kB 155.64 kB
oss-stable/react-art/cjs/react-art.development.js +0.40% 718.69 kB 721.59 kB +0.40% 155.05 kB 155.67 kB
react-native/implementations/ReactFabric-prod.fb.js +0.40% 317.64 kB 318.91 kB +0.36% 56.37 kB 56.57 kB
react-native/implementations/ReactNativeRenderer-prod.js +0.40% 315.64 kB 316.90 kB +0.38% 55.77 kB 55.98 kB
oss-experimental/react-art/cjs/react-art.development.js +0.39% 760.04 kB 762.99 kB +0.39% 163.36 kB 164.00 kB
react-native/implementations/ReactFabric-profiling.js +0.39% 327.95 kB 329.22 kB +0.32% 57.84 kB 58.03 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js +0.39% 860.24 kB 863.56 kB +0.38% 185.56 kB 186.26 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +0.39% 324.42 kB 325.67 kB +0.35% 57.42 kB 57.62 kB
facebook-www/ReactDOMTesting-prod.modern.js +0.38% 438.13 kB 439.80 kB +0.34% 80.80 kB 81.07 kB
oss-experimental/react-art/cjs/react-art.production.min.js +0.38% 91.96 kB 92.31 kB +0.40% 28.30 kB 28.41 kB
react-native/implementations/ReactNativeRenderer-profiling.js +0.37% 334.82 kB 336.07 kB +0.35% 58.89 kB 59.10 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler.profiling.min.js +0.37% 105.63 kB 106.02 kB +0.44% 31.95 kB 32.09 kB
oss-stable/react-reconciler/cjs/react-reconciler.profiling.min.js +0.37% 105.65 kB 106.04 kB +0.44% 31.97 kB 32.11 kB
oss-stable-semver/react-art/umd/react-art.development.js +0.37% 823.64 kB 826.65 kB +0.34% 173.17 kB 173.76 kB
oss-stable/react-art/umd/react-art.development.js +0.37% 823.66 kB 826.68 kB +0.34% 173.18 kB 173.78 kB
facebook-www/ReactDOMTesting-prod.classic.js +0.36% 453.96 kB 455.61 kB +0.32% 83.39 kB 83.65 kB
react-native/implementations/ReactFabric-profiling.fb.js +0.36% 344.30 kB 345.53 kB +0.35% 60.49 kB 60.71 kB
oss-experimental/react-test-renderer/cjs/react-test-renderer.production.min.js +0.36% 97.34 kB 97.69 kB +0.33% 29.88 kB 29.98 kB
facebook-www/ReactDOMTesting-dev.modern.js +0.36% 1,090.52 kB 1,094.39 kB +0.30% 243.34 kB 244.06 kB
oss-experimental/react-art/umd/react-art.development.js +0.35% 867.13 kB 870.21 kB +0.34% 181.55 kB 182.16 kB
oss-experimental/react-test-renderer/umd/react-test-renderer.production.min.js +0.35% 97.58 kB 97.92 kB +0.41% 30.28 kB 30.41 kB
oss-stable-semver/react-art/cjs/react-art.production.min.js +0.35% 85.29 kB 85.58 kB +0.46% 26.47 kB 26.59 kB
oss-stable/react-art/cjs/react-art.production.min.js +0.35% 85.31 kB 85.61 kB +0.45% 26.47 kB 26.59 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +0.35% 351.15 kB 352.37 kB +0.36% 61.52 kB 61.74 kB
facebook-www/ReactDOMTesting-dev.classic.js +0.35% 1,119.38 kB 1,123.26 kB +0.30% 249.06 kB 249.80 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer.development.js +0.34% 34.69 kB 34.80 kB +0.35% 7.82 kB 7.84 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer.development.js +0.34% 34.69 kB 34.80 kB +0.35% 7.82 kB 7.84 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer.development.js +0.34% 34.69 kB 34.80 kB +0.35% 7.82 kB 7.84 kB
oss-experimental/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.34% 34.82 kB 34.94 kB +0.33% 7.84 kB 7.86 kB
oss-stable-semver/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.34% 34.82 kB 34.94 kB +0.33% 7.84 kB 7.86 kB
oss-stable/react-noop-renderer/cjs/react-noop-renderer-persistent.development.js +0.34% 34.82 kB 34.94 kB +0.33% 7.84 kB 7.86 kB
oss-stable-semver/react-test-renderer/cjs/react-test-renderer.production.min.js +0.32% 92.60 kB 92.90 kB +0.40% 28.54 kB 28.66 kB
oss-stable/react-test-renderer/cjs/react-test-renderer.production.min.js +0.32% 92.63 kB 92.92 kB +0.41% 28.54 kB 28.66 kB
oss-stable-semver/react-test-renderer/umd/react-test-renderer.production.min.js +0.32% 92.85 kB 93.14 kB +0.45% 29.01 kB 29.14 kB
oss-stable/react-test-renderer/umd/react-test-renderer.production.min.js +0.32% 92.87 kB 93.17 kB +0.45% 29.01 kB 29.14 kB
oss-stable-semver/react-dom/cjs/react-dom.development.js +0.32% 1,067.74 kB 1,071.11 kB +0.29% 238.55 kB 239.23 kB
oss-stable/react-dom/cjs/react-dom.development.js +0.32% 1,067.77 kB 1,071.13 kB +0.29% 238.57 kB 239.26 kB
facebook-www/JSXDEVRuntime-dev.modern.js +0.31% 45.80 kB 45.94 kB +0.23% 12.99 kB 13.02 kB
facebook-www/JSXDEVRuntime-dev.classic.js +0.31% 45.80 kB 45.94 kB +0.23% 12.99 kB 13.02 kB
oss-stable-semver/react-dom/umd/react-dom.development.js +0.31% 1,119.86 kB 1,123.35 kB +0.29% 241.33 kB 242.03 kB
oss-stable/react-dom/umd/react-dom.development.js +0.31% 1,119.88 kB 1,123.38 kB +0.29% 241.35 kB 242.05 kB
oss-stable-semver/react-dom/cjs/react-dom.production.min.js +0.30% 135.45 kB 135.85 kB +0.33% 43.44 kB 43.58 kB
oss-stable/react-dom/cjs/react-dom.production.min.js +0.30% 135.47 kB 135.87 kB +0.33% 43.44 kB 43.58 kB
oss-stable-semver/react-dom/umd/react-dom.production.min.js +0.30% 135.56 kB 135.96 kB +0.38% 44.08 kB 44.25 kB
oss-stable/react-dom/umd/react-dom.production.min.js +0.30% 135.59 kB 135.99 kB +0.38% 44.08 kB 44.25 kB
facebook-www/ReactTestUtils-dev.modern.js +0.29% 50.19 kB 50.34 kB +0.21% 13.99 kB 14.02 kB
facebook-www/ReactTestUtils-dev.classic.js +0.29% 50.19 kB 50.34 kB +0.21% 13.99 kB 14.01 kB
oss-experimental/react-art/umd/react-art.production.min.js +0.27% 127.80 kB 128.15 kB +0.35% 39.60 kB 39.74 kB
oss-stable-semver/react-dom/umd/react-dom.profiling.min.js +0.26% 144.37 kB 144.74 kB +0.30% 46.35 kB 46.49 kB
oss-stable/react-dom/umd/react-dom.profiling.min.js +0.26% 144.39 kB 144.77 kB +0.30% 46.35 kB 46.49 kB
oss-stable-semver/react-dom/cjs/react-dom.profiling.min.js +0.26% 144.92 kB 145.30 kB +0.33% 45.84 kB 45.99 kB
oss-stable/react-dom/cjs/react-dom.profiling.min.js +0.26% 144.95 kB 145.32 kB +0.33% 45.84 kB 45.99 kB
oss-stable-semver/react-art/umd/react-art.production.min.js +0.24% 121.17 kB 121.46 kB +0.32% 37.69 kB 37.81 kB
oss-stable/react-art/umd/react-art.production.min.js +0.24% 121.19 kB 121.49 kB +0.32% 37.69 kB 37.81 kB
facebook-www/ReactFlightDOMRelayServer-dev.classic.js +0.22% 65.98 kB 66.12 kB +0.18% 16.65 kB 16.68 kB
facebook-www/ReactFlightDOMRelayServer-dev.modern.js +0.22% 66.03 kB 66.18 kB +0.18% 16.67 kB 16.70 kB
oss-experimental/react-reconciler/cjs/react-reconciler-constants.production.min.js = 0.45 kB 0.45 kB = 0.29 kB 0.29 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-constants.production.min.js = 0.45 kB 0.45 kB = 0.29 kB 0.29 kB
oss-stable/react-reconciler/cjs/react-reconciler-constants.production.min.js = 0.45 kB 0.45 kB = 0.29 kB 0.29 kB
oss-experimental/react-reconciler/cjs/react-reconciler-constants.development.js = 1.05 kB 0.96 kB = 0.44 kB 0.43 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-constants.development.js = 1.05 kB 0.96 kB = 0.44 kB 0.43 kB
oss-stable/react-reconciler/cjs/react-reconciler-constants.development.js = 1.05 kB 0.96 kB = 0.44 kB 0.43 kB

Generated by 🚫 dangerJS against a9537b1

tyao1 added a commit that referenced this pull request Jan 5, 2023
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn debug-test --watch TestName`, open
`chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->
This is the other approach for unifying default and sync lane
#25524.
The approach in that PR is to merge default and continuous lane into the
sync lane, and use a new field to track the priority. But there are a
couple places that field will be needed, and it is difficult to
correctly reset the field when there is no sync lane.

In this PR we take the other approach that doesn't remove any lane, but
batch them to get the behavior we want.


## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->
yarn test

Co-authored-by: Andrew Clark <hi@andrewclark.io>
github-actions bot pushed a commit that referenced this pull request Jan 5, 2023
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn debug-test --watch TestName`, open
`chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->
This is the other approach for unifying default and sync lane
#25524.
The approach in that PR is to merge default and continuous lane into the
sync lane, and use a new field to track the priority. But there are a
couple places that field will be needed, and it is difficult to
correctly reset the field when there is no sync lane.

In this PR we take the other approach that doesn't remove any lane, but
batch them to get the behavior we want.

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->
yarn test

Co-authored-by: Andrew Clark <hi@andrewclark.io>

DiffTrain build for [5379b61](5379b61)
[View git log for this commit](https://github.com/facebook/react/commits/5379b6123f171bb48cc8a9c435c11ccb9f8ff0e7)
@tyao1 tyao1 force-pushed the ty-rh-defaut-raf-update branch 3 times, most recently from 16b4d29 to 6e02f5b Compare November 15, 2023 04:02
jerrydev0927 added a commit to jerrydev0927/react that referenced this pull request Jan 5, 2024
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn debug-test --watch TestName`, open
`chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->
This is the other approach for unifying default and sync lane
facebook/react#25524.
The approach in that PR is to merge default and continuous lane into the
sync lane, and use a new field to track the priority. But there are a
couple places that field will be needed, and it is difficult to
correctly reset the field when there is no sync lane.

In this PR we take the other approach that doesn't remove any lane, but
batch them to get the behavior we want.

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->
yarn test

Co-authored-by: Andrew Clark <hi@andrewclark.io>

DiffTrain build for [5379b6123f171bb48cc8a9c435c11ccb9f8ff0e7](facebook/react@5379b61)
[View git log for this commit](https://github.com/facebook/react/commits/5379b6123f171bb48cc8a9c435c11ccb9f8ff0e7)
@jackpope
Copy link
Contributor

Implementation in #25700 was merged

@jackpope jackpope closed this Jun 24, 2024
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.

5 participants