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

Add built-in Suspense cache with support for invalidation (refreshing) #20456

Merged
merged 30 commits into from
Dec 18, 2020

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Dec 14, 2020

Includes all the basic functionality. I think the only features we've discussed that are missing are 1) passing initial data to the refresh method (Update: done), and 2) providing an AbortSignal to cancel remaining requests on completion.

I can open multiple PRs if we want to land the features incrementally. I split it into atomic commits for this purpose, and so it's easier to review.

Most of the commits are already pretty focused, except the last one. I'll work on that.

Technical details

A naive version of this can be built in userspace using the state and context hooks. The internal implementation is nearly identical, but it has two special features that have no userspace equivalent:

Retaining in-progress caches across pings

All the data that loaded as a result of a single transition/update should share the same cache. This includes nested content that gets progressively "filled in" after the initial shell is displayed.

If the shell itself were wrapped in a Cache boundary, such that the cache can commit with suspending, then this is easy: once the boundary mounts, the cache is attached the React tree.

The tricky part is when the shell does not include a cache boundary. In the naive approach, since the cache is not part of the initial tree, it does not get retained; during the retry, a fresh cache is created, leading to duplicate requests and possibly an infinite loop as requests are endlessly created then discarded.

This is the essential problem we faced several years ago when building Simple Cache Provider (later the react-cache package).

Our solution is to retain in-flight caches on the root, associated by lane. The cache cleared from the root once all of the lanes that depend on it finish rendering. [Edit: For now, we're only tracking a single "pooled" cache. We'll add the per-lane map after some planned refactors to the lanes model. Though we still track the lanes that depend on the pooled cache, so that we know when it's OK to clear it.]

Propagating the cache context across spawned tasks

The other tricky bit is that once the initial shell commits, we spawn new tasks to fill in the remaining content. These tasks must use the same cache as the original transition. To implement this, when a Suspense fallback commits, we save a reference to the cache that was used during the attempt to render the primary children.

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 14, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 14, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 7c7d2ba:

Sandbox Source
React Configuration

@sizebot
Copy link

sizebot commented Dec 14, 2020

Details of bundled changes.

Comparing: 00a5b08...7c7d2ba

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOM-profiling.js +1.8% +1.5% 401.25 KB 408.28 KB 74.16 KB 75.3 KB FB_WWW_PROFILING
react-dom-server.browser.development.js +0.1% +0.1% 143.04 KB 143.17 KB 36.64 KB 36.67 KB UMD_DEV
react-dom-server.node.development.js +0.1% +0.1% 136.96 KB 137.09 KB 36.43 KB 36.46 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.3% 🔺+0.3% 19.82 KB 19.87 KB 7.44 KB 7.46 KB UMD_PROD
react-dom-server.node.production.min.js 🔺+0.2% 🔺+0.3% 20.14 KB 20.19 KB 7.56 KB 7.58 KB NODE_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 13.68 KB 13.68 KB 5.26 KB 5.25 KB NODE_PROD
ReactDOMTesting-prod.js 🔺+0.1% 🔺+0.1% 385.92 KB 386.46 KB 72.81 KB 72.92 KB FB_WWW_PROD
react-dom.development.js +0.1% +0.1% 928.47 KB 929.82 KB 204.26 KB 204.56 KB UMD_DEV
ReactTestUtils-dev.js +0.1% +0.1% 61.18 KB 61.26 KB 16.86 KB 16.88 KB FB_WWW_DEV
react-dom.production.min.js 🔺+0.2% 🔺+0.2% 118.91 KB 119.13 KB 39.04 KB 39.1 KB UMD_PROD
react-dom.profiling.min.js +0.2% +0.2% 123 KB 123.24 KB 40.28 KB 40.35 KB UMD_PROFILING
react-dom.development.js +0.1% +0.2% 883.58 KB 884.86 KB 201.59 KB 201.92 KB NODE_DEV
ReactDOMForked-dev.js +1.7% +1.6% 996.1 KB 1012.54 KB 221.2 KB 224.72 KB FB_WWW_DEV
react-dom.production.min.js 🔺+0.2% 🔺+0.2% 119.02 KB 119.26 KB 38.3 KB 38.35 KB NODE_PROD
ReactDOMForked-prod.js 🔺+1.8% 🔺+1.7% 383.4 KB 390.47 KB 70.98 KB 72.18 KB FB_WWW_PROD
react-dom.profiling.min.js +0.2% +0.2% 123.28 KB 123.52 KB 39.5 KB 39.57 KB NODE_PROFILING
ReactDOMForked-profiling.js +1.8% +1.5% 401.26 KB 408.29 KB 74.16 KB 75.3 KB FB_WWW_PROFILING
ReactDOM-dev.js +1.7% +1.6% 996.1 KB 1012.54 KB 221.17 KB 224.68 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+1.8% 🔺+1.7% 383.39 KB 390.46 KB 70.98 KB 72.18 KB FB_WWW_PROD
react-dom-server.browser.development.js +0.1% +0.1% 135.7 KB 135.82 KB 36.18 KB 36.21 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.3% 🔺+0.3% 19.72 KB 19.77 KB 7.4 KB 7.42 KB NODE_PROD
react-dom-test-utils.development.js +0.1% +0.1% 71.28 KB 71.36 KB 19.3 KB 19.32 KB UMD_DEV
ReactDOMServer-dev.js +0.2% +0.2% 146.04 KB 146.3 KB 37.51 KB 37.57 KB FB_WWW_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 13.7 KB 13.7 KB 5.31 KB 5.31 KB UMD_PROD
ReactDOMServer-prod.js 🔺+0.4% 🔺+0.3% 47.23 KB 47.44 KB 11.02 KB 11.06 KB FB_WWW_PROD
react-dom-test-utils.development.js +0.1% +0.1% 66.1 KB 66.17 KB 18.79 KB 18.8 KB NODE_DEV
ReactDOMTesting-dev.js +0.1% +0.2% 946.93 KB 948.23 KB 212.47 KB 212.8 KB FB_WWW_DEV

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-profiling.js +0.2% +0.2% 283.57 KB 284.03 KB 50.74 KB 50.83 KB RN_OSS_PROFILING
ReactFabric-profiling.js +0.2% +0.2% 277.63 KB 278.09 KB 49.5 KB 49.58 KB RN_FB_PROFILING
ReactFabric-dev.js +0.2% +0.2% 668.29 KB 669.59 KB 144.61 KB 144.92 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.2% 🔺+0.1% 265.84 KB 266.29 KB 47.29 KB 47.36 KB RN_OSS_PROD
ReactFabric-profiling.js +0.2% +0.2% 277.67 KB 278.13 KB 49.52 KB 49.6 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js +0.2% +0.2% 687.55 KB 688.85 KB 149.17 KB 149.47 KB RN_OSS_DEV
ReactFabric-dev.js +0.2% +0.2% 673.69 KB 675 KB 145.49 KB 145.79 KB RN_FB_DEV
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 272 KB 272.46 KB 48.47 KB 48.54 KB RN_OSS_PROD
ReactFabric-prod.js 🔺+0.2% 🔺+0.1% 265.81 KB 266.26 KB 47.28 KB 47.35 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.2% +0.2% 692.95 KB 694.25 KB 150.05 KB 150.35 KB RN_FB_DEV
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 271.96 KB 272.41 KB 48.45 KB 48.53 KB RN_FB_PROD
ReactNativeRenderer-profiling.js +0.2% +0.2% 283.52 KB 283.98 KB 50.72 KB 50.81 KB RN_FB_PROFILING

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.2% +0.3% 615.83 KB 617.18 KB 129.83 KB 130.15 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.3% 🔺+0.3% 77.46 KB 77.71 KB 24.35 KB 24.43 KB UMD_PROD
ReactTestRenderer-dev.js +0.2% +0.2% 596.4 KB 597.71 KB 129.2 KB 129.51 KB RN_FB_DEV
ReactTestRenderer-prod.js 🔺+0.2% 🔺+0.2% 233.04 KB 233.48 KB 42.52 KB 42.6 KB RN_FB_PROD
ReactTestRenderer-profiling.js +0.2% +0.2% 244.49 KB 244.93 KB 44.76 KB 44.84 KB RN_FB_PROFILING
react-test-renderer.development.js +0.2% +0.2% 586.66 KB 587.94 KB 128.32 KB 128.63 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.3% 🔺+0.3% 77.27 KB 77.51 KB 24.03 KB 24.11 KB NODE_PROD
ReactTestRenderer-dev.js +0.2% +0.3% 601.81 KB 603.12 KB 129.56 KB 129.89 KB FB_WWW_DEV

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js +2.5% +2.5% 646.69 KB 663.13 KB 137.74 KB 141.24 KB FB_WWW_DEV
react-art.development.js +0.2% +0.2% 675.22 KB 676.57 KB 143.86 KB 144.19 KB UMD_DEV
react-art.production.min.js 🔺+0.2% 🔺+0.2% 109.6 KB 109.84 KB 34.02 KB 34.09 KB UMD_PROD
react-art.development.js +0.2% +0.2% 577.14 KB 578.42 KB 126 KB 126.31 KB NODE_DEV
react-art.production.min.js 🔺+0.3% 🔺+0.3% 74.58 KB 74.83 KB 23.19 KB 23.27 KB NODE_PROD
ReactART-prod.js 🔺+2.9% 🔺+2.8% 242.58 KB 249.54 KB 43.22 KB 44.41 KB FB_WWW_PROD

react-server-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server-dom-webpack-writer.browser.development.server.js +1.2% +0.7% 25.13 KB 25.43 KB 6.77 KB 6.82 KB NODE_DEV
react-server-dom-webpack-node-register.js 0.0% -0.1% 3.2 KB 3.2 KB 1.3 KB 1.3 KB NODE_ES2015
react-server-dom-webpack-writer.browser.production.min.server.js 🔺+1.2% 🔺+0.7% 6.29 KB 6.37 KB 2.63 KB 2.65 KB NODE_PROD
react-server-dom-webpack-plugin.js 0.0% -0.0% 8.12 KB 8.12 KB 2.66 KB 2.66 KB NODE_ES2015
react-server-dom-webpack.development.js +0.4% +0.4% 18.01 KB 18.09 KB 4.94 KB 4.96 KB UMD_DEV
react-server-dom-webpack.development.js +0.5% +0.4% 16.8 KB 16.88 KB 4.83 KB 4.84 KB NODE_DEV
react-server-dom-webpack.production.min.js 0.0% -0.1% 3.73 KB 3.73 KB 1.67 KB 1.67 KB NODE_PROD
react-server-dom-webpack-writer.browser.development.server.js +1.2% +0.7% 26.75 KB 27.07 KB 6.91 KB 6.96 KB UMD_DEV
react-server-dom-webpack-writer.node.development.server.js +1.1% +0.7% 26.07 KB 26.37 KB 7.03 KB 7.08 KB NODE_DEV
react-server-dom-webpack-writer.browser.production.min.server.js 🔺+1.2% 🔺+0.8% 6.5 KB 6.58 KB 2.72 KB 2.74 KB UMD_PROD
react-server-dom-webpack-writer.node.production.min.server.js 🔺+1.2% 🔺+0.8% 6.49 KB 6.56 KB 2.65 KB 2.68 KB NODE_PROD

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-jsx-runtime.production.min.js 0.0% -0.2% 971 B 971 B 607 B 606 B NODE_PROD
React-profiling.js +1.1% +0.7% 16.49 KB 16.67 KB 4.3 KB 4.33 KB FB_WWW_PROFILING
React-dev.js +0.4% +0.3% 87.93 KB 88.31 KB 21.15 KB 21.22 KB RN_FB_DEV
React-prod.js 🔺+1.1% 🔺+0.8% 16.75 KB 16.93 KB 4.46 KB 4.49 KB RN_FB_PROD
React-profiling.js +1.1% +0.8% 16.75 KB 16.93 KB 4.46 KB 4.49 KB RN_FB_PROFILING
react-jsx-dev-runtime.development.js +0.5% +0.4% 36.88 KB 37.08 KB 10.66 KB 10.71 KB NODE_DEV
react-jsx-dev-runtime.production.min.js 0.0% -0.3% 465 B 465 B 322 B 321 B NODE_PROD
react-jsx-runtime.development.js +0.5% +0.4% 37.47 KB 37.66 KB 10.83 KB 10.88 KB NODE_DEV
JSXDEVRuntime-dev.js +0.4% +0.3% 40.39 KB 40.55 KB 11.3 KB 11.33 KB FB_WWW_DEV
react.development.js +0.2% +0.2% 107.19 KB 107.4 KB 26.44 KB 26.5 KB UMD_DEV
react.production.min.js 0.0% -0.0% 10.75 KB 10.75 KB 4.34 KB 4.34 KB UMD_PROD
react-unstable-shared-subset.production.min.js 0.0% -0.7% 374 B 374 B 277 B 275 B NODE_PROD
react.profiling.min.js 0.0% 0.0% 14.26 KB 14.26 KB 5.41 KB 5.41 KB UMD_PROFILING
react.development.js +0.3% +0.2% 70.72 KB 70.91 KB 19.14 KB 19.19 KB NODE_DEV
JSXDEVRuntime-dev.js +0.5% +0.4% 31.81 KB 31.98 KB 9.05 KB 9.09 KB RN_FB_DEV
react.production.min.js 0.0% 0.0% 6.32 KB 6.32 KB 2.62 KB 2.62 KB NODE_PROD
React-dev.js +0.4% +0.3% 96.27 KB 96.65 KB 23.51 KB 23.57 KB FB_WWW_DEV
JSXRuntime-dev.js +0.5% +0.4% 32.39 KB 32.56 KB 9.22 KB 9.26 KB RN_FB_DEV
React-prod.js 🔺+1.1% 🔺+0.7% 16.49 KB 16.67 KB 4.3 KB 4.33 KB FB_WWW_PROD

react-server-dom-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightDOMRelayClient-dev.js +0.7% +0.5% 11.62 KB 11.7 KB 3.41 KB 3.42 KB FB_WWW_DEV
ReactFlightDOMRelayServer-dev.js +1.2% +0.8% 25.98 KB 26.29 KB 6.76 KB 6.81 KB FB_WWW_DEV
ReactFlightDOMRelayServer-prod.js 🔺+1.2% 🔺+0.7% 14.05 KB 14.22 KB 3.73 KB 3.75 KB FB_WWW_PROD

react-server

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server-flight.production.min.js 🔺+1.2% 🔺+0.8% 6.53 KB 6.61 KB 2.7 KB 2.72 KB NODE_PROD
react-server-flight.development.js +1.2% +0.7% 25.53 KB 25.82 KB 6.88 KB 6.93 KB NODE_DEV
react-server.development.js +1.4% +1.0% 5.26 KB 5.34 KB 1.68 KB 1.7 KB NODE_DEV

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-reflection.development.js +0.8% +0.6% 15.88 KB 16 KB 4.84 KB 4.87 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% 🔺+0.1% 2.62 KB 2.62 KB 1.13 KB 1.13 KB NODE_PROD
react-reconciler.development.js +0.2% +0.2% 631.96 KB 633.24 KB 135.33 KB 135.66 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.3% 🔺+0.2% 84.05 KB 84.31 KB 26.05 KB 26.11 KB NODE_PROD
react-reconciler.profiling.min.js +0.3% +0.4% 88.19 KB 88.45 KB 27.27 KB 27.38 KB NODE_PROFILING

ReactDOM: size: 🔺+0.3%, gzip: 🔺+0.3%

React: size: 0.0%, gzip: -0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 7c7d2ba

@sizebot
Copy link

sizebot commented Dec 14, 2020

Details of bundled changes.

Comparing: 00a5b08...7c7d2ba

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactDOM-profiling.js +1.8% +1.6% 389.79 KB 396.81 KB 72.28 KB 73.45 KB FB_WWW_PROFILING
react-dom-server.browser.development.js +0.2% +0.1% 144.8 KB 145.08 KB 36.88 KB 36.93 KB UMD_DEV
react-dom-server.node.development.js +0.2% +0.2% 138.63 KB 138.89 KB 36.69 KB 36.75 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.5% 🔺+0.5% 20.33 KB 20.42 KB 7.54 KB 7.57 KB UMD_PROD
react-dom-server.node.production.min.js 🔺+0.5% 🔺+0.4% 20.65 KB 20.75 KB 7.65 KB 7.68 KB NODE_PROD
react-dom-test-utils.production.min.js 0.0% -0.0% 13.7 KB 13.7 KB 5.27 KB 5.26 KB NODE_PROD
ReactDOMTesting-prod.js 🔺+0.1% 🔺+0.2% 372.71 KB 373.24 KB 70.6 KB 70.71 KB FB_WWW_PROD
react-dom.development.js +1.8% +1.7% 965.14 KB 982.33 KB 210.96 KB 214.54 KB UMD_DEV
ReactTestUtils-dev.js +0.1% +0.1% 61.18 KB 61.26 KB 16.86 KB 16.88 KB FB_WWW_DEV
react-dom.production.min.js 🔺+2.0% 🔺+1.8% 123.06 KB 125.5 KB 40.34 KB 41.08 KB UMD_PROD
react-dom.profiling.min.js +1.9% +1.8% 128.72 KB 131.17 KB 42.03 KB 42.8 KB UMD_PROFILING
react-dom-unstable-fizz.browser.development.js +1.6% +1.0% 5.07 KB 5.15 KB 1.74 KB 1.76 KB UMD_DEV
react-dom-unstable-fizz.node.development.js +1.4% +0.8% 5.35 KB 5.42 KB 1.8 KB 1.82 KB NODE_DEV
react-dom.development.js +1.8% +1.7% 918.52 KB 934.88 KB 208.24 KB 211.84 KB NODE_DEV
ReactDOMForked-dev.js +1.7% +1.6% 970.52 KB 986.96 KB 216.42 KB 219.94 KB FB_WWW_DEV
react-dom.production.min.js 🔺+2.0% 🔺+2.0% 123.23 KB 125.68 KB 39.57 KB 40.37 KB NODE_PROD
ReactDOMForked-prod.js 🔺+1.9% 🔺+1.7% 371.99 KB 379.06 KB 69.13 KB 70.31 KB FB_WWW_PROD
react-dom.profiling.min.js +1.9% +1.8% 129.11 KB 131.56 KB 41.34 KB 42.09 KB NODE_PROFILING
ReactDOMForked-profiling.js +1.8% +1.6% 389.8 KB 396.82 KB 72.29 KB 73.46 KB FB_WWW_PROFILING
react-dom-unstable-fizz.browser.development.js +1.7% +1.0% 4.6 KB 4.68 KB 1.64 KB 1.66 KB NODE_DEV
ReactDOM-dev.js +1.7% +1.6% 970.52 KB 986.96 KB 216.41 KB 219.91 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+1.9% 🔺+1.7% 371.98 KB 379.05 KB 69.12 KB 70.3 KB FB_WWW_PROD
react-dom-server.browser.development.js +0.2% +0.2% 137.36 KB 137.62 KB 36.44 KB 36.5 KB NODE_DEV
react-dom-server.browser.production.min.js 🔺+0.5% 🔺+0.4% 20.23 KB 20.33 KB 7.5 KB 7.53 KB NODE_PROD
react-dom-test-utils.development.js +0.1% +0.1% 71.29 KB 71.37 KB 19.31 KB 19.33 KB UMD_DEV
ReactDOMServer-dev.js +0.2% +0.2% 142.01 KB 142.27 KB 36.5 KB 36.56 KB FB_WWW_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 13.71 KB 13.71 KB 5.32 KB 5.32 KB UMD_PROD
ReactDOMServer-prod.js 🔺+0.4% 🔺+0.3% 46.37 KB 46.58 KB 10.81 KB 10.85 KB FB_WWW_PROD
react-dom-test-utils.development.js +0.1% +0.1% 66.11 KB 66.18 KB 18.79 KB 18.81 KB NODE_DEV
ReactDOMTesting-dev.js +0.1% +0.2% 918.59 KB 919.89 KB 206.8 KB 207.13 KB FB_WWW_DEV

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-profiling.js +0.2% +0.2% 283.58 KB 284.04 KB 50.75 KB 50.84 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.2% +0.2% 668.3 KB 669.6 KB 144.62 KB 144.92 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.2% 🔺+0.1% 265.85 KB 266.31 KB 47.3 KB 47.37 KB RN_OSS_PROD
ReactFabric-profiling.js +0.2% +0.2% 277.68 KB 278.14 KB 49.53 KB 49.61 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js +0.2% +0.2% 687.56 KB 688.86 KB 149.18 KB 149.48 KB RN_OSS_DEV
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 272.02 KB 272.47 KB 48.48 KB 48.55 KB RN_OSS_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.2% +0.2% 615.85 KB 617.2 KB 129.84 KB 130.17 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.3% 🔺+0.3% 77.48 KB 77.73 KB 24.36 KB 24.44 KB UMD_PROD
ReactTestRenderer-dev.js +0.2% +0.2% 596.42 KB 597.72 KB 129.21 KB 129.52 KB RN_FB_DEV
ReactTestRenderer-prod.js 🔺+0.2% 🔺+0.2% 233.06 KB 233.49 KB 42.53 KB 42.6 KB RN_FB_PROD
ReactTestRenderer-profiling.js +0.2% +0.2% 244.5 KB 244.94 KB 44.77 KB 44.84 KB RN_FB_PROFILING
react-test-renderer.development.js +0.2% +0.2% 586.68 KB 587.96 KB 128.33 KB 128.64 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.3% 🔺+0.3% 77.29 KB 77.54 KB 24.05 KB 24.13 KB NODE_PROD
ReactTestRenderer-dev.js +0.2% +0.3% 601.83 KB 603.13 KB 129.57 KB 129.9 KB FB_WWW_DEV

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js +2.6% +2.6% 636.68 KB 653.12 KB 135.73 KB 139.22 KB FB_WWW_DEV
react-art.development.js +2.5% +2.5% 701.6 KB 718.79 KB 148.97 KB 152.65 KB UMD_DEV
react-art.production.min.js 🔺+2.2% 🔺+2.2% 112.16 KB 114.61 KB 34.83 KB 35.62 KB UMD_PROD
react-art.development.js +2.7% +2.7% 602.28 KB 618.63 KB 131.05 KB 134.65 KB NODE_DEV
react-art.production.min.js 🔺+3.2% 🔺+3.3% 77.09 KB 79.55 KB 24.02 KB 24.81 KB NODE_PROD
ReactART-prod.js 🔺+3.0% 🔺+2.9% 235.38 KB 242.32 KB 41.96 KB 43.18 KB FB_WWW_PROD

react-server-dom-webpack

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server-dom-webpack-writer.browser.development.server.js +1.2% +0.7% 25.14 KB 25.44 KB 6.78 KB 6.83 KB NODE_DEV
react-server-dom-webpack-node-register.js 0.0% -0.1% 3.21 KB 3.21 KB 1.31 KB 1.31 KB NODE_ES2015
react-server-dom-webpack-writer.browser.production.min.server.js 🔺+1.2% 🔺+0.7% 6.31 KB 6.38 KB 2.64 KB 2.66 KB NODE_PROD
react-server-dom-webpack-node-loader.js 0.0% -0.0% 8.25 KB 8.25 KB 2.76 KB 2.76 KB NODE_ESM
react-server-dom-webpack-plugin.js 0.0% -0.0% 8.14 KB 8.14 KB 2.67 KB 2.67 KB NODE_ES2015
react-server-dom-webpack.development.js +0.4% +0.4% 18.02 KB 18.1 KB 4.95 KB 4.97 KB UMD_DEV
react-server-dom-webpack.development.js +0.5% +0.4% 16.81 KB 16.89 KB 4.83 KB 4.85 KB NODE_DEV
react-server-dom-webpack-writer.browser.development.server.js +1.2% +0.7% 26.77 KB 27.09 KB 6.92 KB 6.97 KB UMD_DEV
react-server-dom-webpack-writer.node.development.server.js +1.1% +0.7% 26.08 KB 26.38 KB 7.04 KB 7.09 KB NODE_DEV
react-server-dom-webpack-writer.browser.production.min.server.js 🔺+1.2% 🔺+0.8% 6.51 KB 6.59 KB 2.73 KB 2.75 KB UMD_PROD
react-server-dom-webpack-writer.node.production.min.server.js 🔺+1.2% 🔺+0.7% 6.5 KB 6.58 KB 2.67 KB 2.68 KB NODE_PROD

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
React-profiling.js +1.1% +0.7% 16.35 KB 16.53 KB 4.26 KB 4.29 KB FB_WWW_PROFILING
React-dev.js +0.4% +0.3% 86.93 KB 87.32 KB 20.92 KB 20.99 KB RN_FB_DEV
React-prod.js 🔺+1.1% 🔺+0.7% 16.61 KB 16.79 KB 4.41 KB 4.44 KB RN_FB_PROD
React-profiling.js +1.1% +0.7% 16.61 KB 16.79 KB 4.41 KB 4.44 KB RN_FB_PROFILING
react-jsx-dev-runtime.development.js +0.4% +0.3% 36.9 KB 37.05 KB 10.66 KB 10.69 KB NODE_DEV
react-jsx-runtime.development.js +0.4% +0.3% 37.48 KB 37.64 KB 10.84 KB 10.87 KB NODE_DEV
JSXDEVRuntime-dev.js +0.4% +0.3% 40.39 KB 40.55 KB 11.3 KB 11.33 KB FB_WWW_DEV
react.development.js +0.4% +0.2% 108.98 KB 109.38 KB 26.76 KB 26.83 KB UMD_DEV
react-unstable-shared-subset.development.js +0.2% +0.2% 65.89 KB 66.05 KB 17.97 KB 18.01 KB NODE_DEV
react.production.min.js 🔺+1.0% 🔺+0.6% 11.63 KB 11.75 KB 4.6 KB 4.62 KB UMD_PROD
react.profiling.min.js +0.8% +0.7% 15.14 KB 15.26 KB 5.66 KB 5.7 KB UMD_PROFILING
react.development.js +0.5% +0.3% 72.41 KB 72.79 KB 19.45 KB 19.51 KB NODE_DEV
JSXDEVRuntime-dev.js +0.5% +0.4% 31.81 KB 31.98 KB 9.05 KB 9.09 KB RN_FB_DEV
react.production.min.js 🔺+1.9% 🔺+1.1% 7.27 KB 7.41 KB 2.88 KB 2.91 KB NODE_PROD
React-dev.js +0.4% +0.3% 95.27 KB 95.66 KB 23.28 KB 23.34 KB FB_WWW_DEV
JSXRuntime-dev.js +0.5% +0.4% 32.39 KB 32.56 KB 9.22 KB 9.26 KB RN_FB_DEV
React-prod.js 🔺+1.1% 🔺+0.7% 16.35 KB 16.53 KB 4.26 KB 4.29 KB FB_WWW_PROD

react-server-dom-relay

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFlightDOMRelayClient-dev.js +0.7% +0.5% 11.62 KB 11.7 KB 3.41 KB 3.42 KB FB_WWW_DEV
ReactFlightDOMRelayServer-dev.js +1.2% +0.8% 25.98 KB 26.29 KB 6.76 KB 6.81 KB FB_WWW_DEV
ReactFlightDOMRelayServer-prod.js 🔺+1.2% 🔺+0.7% 14.05 KB 14.22 KB 3.73 KB 3.75 KB FB_WWW_PROD

react-server

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-server-flight.production.min.js 🔺+1.2% 🔺+0.7% 6.54 KB 6.62 KB 2.71 KB 2.73 KB NODE_PROD
react-server-flight.development.js +1.2% +0.7% 25.54 KB 25.84 KB 6.89 KB 6.93 KB NODE_DEV
react-server.development.js +1.4% +1.0% 5.27 KB 5.35 KB 1.69 KB 1.71 KB NODE_DEV

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-reflection.development.js +0.8% +0.6% 15.89 KB 16.01 KB 4.85 KB 4.88 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% 🔺+0.1% 2.63 KB 2.63 KB 1.13 KB 1.14 KB NODE_PROD
react-reconciler.development.js +2.5% +2.6% 659.82 KB 676.36 KB 140.97 KB 144.61 KB NODE_DEV
react-reconciler.production.min.js 🔺+2.9% 🔺+3.1% 86.99 KB 89.54 KB 26.85 KB 27.69 KB NODE_PROD
react-reconciler.profiling.min.js +2.8% +2.9% 92.75 KB 95.31 KB 28.64 KB 29.47 KB NODE_PROFILING

ReactDOM: size: 🔺+0.5%, gzip: 🔺+0.5%

React: size: 🔺+1.0%, gzip: 🔺+0.6%

Size changes (experimental)

Generated by 🚫 dangerJS against 7c7d2ba

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

Seems like DevTools (and ReactDebugHooks) need to be updated as well to account for this new type and useRefresh. Want me to make a follow up PR?

packages/react-reconciler/src/ReactFiberNewContext.new.js Outdated Show resolved Hide resolved
@bvaughn
Copy link
Contributor

bvaughn commented Dec 14, 2020

Seems like we could add some interesting (probably pretty easy to build) support for this in DevTools beyond just displaying "<Cache>" – peek at the cached values, edit them, manually trigger a refresh, etc. – once this API is more stable. Let's chat (or at least file a follow up issue) about it sometime soon?

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

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

I started looking into this too but this is more flushed out.

However, I started with only the root. The only thing we really need from the start is for the root to have a built-in Cache without the need for a Cache component in the tree. It's important that people don't start doing this unless it's literally at the root because it's so easy to add a layer of several caches where some of them never get evicted. So it's bad practice to define these at the root. Therefore I think we need this from the very start.

So I started looking into adding validation into the root's updateQueue. Otherwise, we'd have to add this component to every tree and it seems easy enough to just reuse the update queue to have children and a cache.

The other consideration I had is that this feature really isn't worth many bytes since it's not meant to be heavily used. The user space wiring we've played with is super small.

If anything user space is better because it's lazily loaded and you can just use more features in the rare trees that does fetching on the client.

I originally looked into custom propagation to specialize and be fast but I felt it wasn't worth the bytes so reusing the built-in context propagation was better.

Why did you end up using custom propagation? Especially since we don't use the subscription based approach elsewhere?

I think you can just the let the Cache rerender and use the change in cache value as signal to use the new one.

packages/react-reconciler/src/ReactFiberCacheComponent.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

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

The root must have a refreshable built-in cache without opting into it. Each root needs its own.

@acdlite
Copy link
Collaborator Author

acdlite commented Dec 14, 2020

Why did you end up using custom propagation? Especially since we don't use the subscription based approach elsewhere?

No inherent reason. I originally used regular context but I kept running into little cases where I would either need to make CacheComponent type look like a Provider, or add additional branches to the normal context path. Since I wasn't sure of all the requirements at the time, I decided to fork it until things became clearer.

I originally looked into custom propagation to specialize and be fast but I felt it wasn't worth the bytes so reusing the built-in context propagation was better.

Yeah basically that.

The subscription thing is only for scheduling a refresh. Since the same cache may be associated with multiple providers. This is probably the weirdest part of the PR but I think it's the best way to do it if we want that behavior. Alternatively, a refresh could scan the entire tree from the root once and look for boundaries with matching caches. (That possibility was another reason I opted to fork the propagation function.)

Besides propagation, we can probably also shave some bytes off the lane logic once we do the planned refactors. But I don't that will save much in the compiled bundles, even though the source is big.

There's also the code for the new hooks. Can't really do much about that.

@@ -314,6 +319,7 @@ export type Dispatcher = {|
subscribe: MutableSourceSubscribeFn<Source, Snapshot>,
): Snapshot,
useOpaqueIdentifier(): any,
useRefresh?: () => <T>(?() => T, ?T) => void,
Copy link
Contributor

Choose a reason for hiding this comment

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

This optional hook is tricky, since it prevents Flow from calling out this incompatibility:

const Dispatcher: DispatcherType = {
getCacheForType,
readContext,
useCallback,
useContext,
useEffect,
useImperativeHandle,
useDebugValue,
useLayoutEffect,
useMemo,
useReducer,
useRef,
useState,
useTransition,
useMutableSource,
useDeferredValue,
useOpaqueIdentifier,
};

If DevTools were used to inspect any component that used this new hook, it would cause a runtime error.

I'll add a follow up PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

getCacheForType is also optional and there was some discussion for why there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I'm cool with it always being there

@sebmarkbage
Copy link
Collaborator

sebmarkbage commented Dec 14, 2020

The subscription thing is only for scheduling a refresh. Since the same cache may be associated with multiple providers.

Refresh is not supposed to refresh siblings caches just because they start out with the same cache though.

@acdlite
Copy link
Collaborator Author

acdlite commented Dec 14, 2020

Discussed out-of-band:

  • Remove sibling refresh behavior
  • Implement default cache at the root
  • Use update queue for refreshes

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

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

Looks like you have a file size increase in stable. What's the source of that? Missing a feature flag check somewhere?

@acdlite
Copy link
Collaborator Author

acdlite commented Dec 15, 2020

@sebmarkbage Not sure, I was going to wait until the end to look into that.

I just pushed the root cache behavior. I'll write some more tests but should be ready for another look.

if (enableCache) {
// Subsequent loads in this lane should use a fresh cache.
// TODO: If a cache is no longer associated with any lane, we should issue
// an abort signal.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This todo won't work because there can still be pending loads that will end up being used later after a state change reveals them. In fact, that's a key feature that we can preload other branches so they don't unexpectedly load later when they're actually rendered.

Instead, we can issue abort signal when a refresh would destroy this cache. We can do that eagerly in the imperative refresh call.

This still leaves cases when the signal is not invoked because we don't have a cleanup phase that can capture it all, but that might be fine because it's only an optimization - not a guarantee.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Instead, we can issue abort signal when a refresh would destroy this cache. We can do that eagerly in the imperative refresh call.

Wouldn't that suffer from the same problem, though, since multiple trees can share the same cache?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You would need something like the subscription logic I was using to track siblings to know for sure that none of the requests are needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can ref count. You might not hit zero unless all are replaced instead of dropped.

I noticed this bug when writing some new tests.

The HostRoot fiber is special because it's always mounted. The moment
you call `createRoot()`, you have a "current" (albeit empty) tree. So
the "initial render" of an app is actually implemented internally as an
update. This model has some nice advantages because we can use a regular
Fiber and regular update queue to manage in-progress work even before
the initial commit.

However, for the purposes of the cache, we want the initial render to be
treated like an initial render: all requests should share the same
cache, including nested boundaries. My trick of checking if the provider
fiber has an alternate won't work, because the root fiber always has an
alternate.

So I use another trick: if the provider fiber is a host root, check if
`memoizedState.element` is null. We also check the alternate. The
work-in-progress fiber's `element` will never be null because we're
inside a work-in-progress tree. So if either fiber's element is null,
that fiber must be the current one, which most likely means it's the
initial mount.

(I say "most likely" because, technically, you could pass `null` to
`root.render()`. But, meh, good enough.)

Fixing this revealed a related bug in one of my tests. When you render
the initial app, all the caches on the entire page share the same
provider: the root. So a refresh anywhere in the UI will refresh the
entire screen... until you navigate or reveal more content. The more you
interact with the UI, the more granular the consistency boundaries get.

I also found another bug where caches were not transfered across retries
if the original update was spawned by a cache refresh. That's because
refresh caches are stored in the provider's update queue; we don't track
these on these on the root, because they're already part of the tree.

So for these types of retries, we can go back to the original trick I
attempted at the beginning of this exploration: when mounting a new
tree, consult the render lanes to see if it's a retry. If it is, and
there's no cache associated with those lanes, then the retry must have
been the result of a cache refresh. Which means the nearest cache
provider must be the one that we want: the one that refreshed.
Extracted these into functions so I can put more stuff there.
A parent cache refresh always overrides any nested cache. So there will
only ever be a single fresh cache on the context stack.

We can use this knowledge to detect stack mismatch bugs.
We can track this cheaply because there's only ever a single fresh
provider. We don't need to store the fresh caches on the stack, just one
if it exists. Then when we unwind the Fiber stack, we reset it.

Bonus: this replaces the fast path I added to detect fresh roots, too.
When a Suspense or Offscreen boundary resumes rendering, the inner tree
should use the same cache that the outer one did during the original
render. This is important not just for UI consistency reasons, but
because dropping the original cache means dropping all the in-
flight requests.

This is arguably an edge case, because it only applies to the first
Cache boundary in the new tree is not part of its "shell" — that is,
if it's inside the first Suspense boundary, and isn't committed in the
first render. But we should still try to get it right.

Previously I was using an array on the root (the one we use for
tracking caches that aren't yet rooted to the tree) but with that
approach you quickly run out of lanes.

The new approach is to store the cache on the Offscreen fiber. Suspense
uses an Offscreen fiber internally to wrap its children, so the code is
almost entirely shared.

A neat property is that we only have to store a single cache per
fallback/hidden tree. I had previously expected that we'd need to store
a cache per retry lane per tree. But, when unhiding a hidden tree, the
retry lanes must be entangled — that was the discovery we made when
fixing the "flickering" bug earlier in the year. So we actually only
need a single retry cache per hidden Suspense/Offscreen boundary. Even
setting aside entanglement, the only reason you'd have multiple is if
there were multiple parent refreshes, in which case the last one should
win regardless. The important thing is that each separate tree can have
their own, which this approach achieves.
- Wraped more things in the feature flag.
- Removed CacheComponent cases from commit phase.
From @sebmarkbage's comment

> This should not be included in this file. Which means that the error
> the dispatcher throws should never be reachable, but worth keep in
> case something is misconfigured or tries use internals.
>
> This ensures that statically, we can say that a shared/server component
> can't import this at all so there's no risk of accidentally using it and
> it's a signal that a client component is needed.
When committing a fallback, if there's no cache on the stack, check if
there's a cache from the previous render. This is what we would have
used for new content during the first pass when we attempted to unhide.

If there's no previous cache, then we can check the pool. If a nested
cache accessed the pool, it would have been assigned
to `root.pooledCache`.
When retrying with a pooled cache resumed from the first render, we
can't put the cache on the regular Suspense context, because it will
override nested refreshes. We have to track it on a different conceptual
context stack. Currently that's `root.pooledCache`. So my solution is to
overwrite that field when we enter the nested subtree. (This might be too
clever and I should put it on a stack cursor instead. Regardless, it
doesn't change much about the structure of code.)

I originally noticed this issue because the type of `root.pooledCache`
was `{cache: Cache, provider: Fiber}` — pooled caches do not have
providers!

This fix partially depends on a planned change to get rid of the
lane-indexed cache pool and always read from `root.pooledCache`. I'll do
that in the next commit.
The cache-per-lane approach makes conceptual sense but it's probably not
worth it until we complete the Lanes entanglement refactor. In the
current implementation we have to do lots of looping to maintain the
pool. And most transitions get batched together, anyway.

We'll re-evaluate later.
useRefresh is probably too general. We may also add additional APIs
related to the cache, and including the word "cache" in all of them
signals they are related.
The flaw here is that if another update in the same event is not wrapped
in `startTransition`, then it won't be batched with the refresh. The
solution is to wrap both in the same `startTransition`. It's worse for
them not to be batched then for the batch to have too high a priority.

We'll consider adding a warning.
Split into `new` and `old` reconciler files
Less indirection when accessing during the render phase and less hard
to make a mutation mistake.
I originally put the provider fiber on the cache context because I
expected the semantics to be that a refresh finds the root of the
"freshness" boundary; that is, all the data that refreshed or appeared
as part of the same transition.

Refreshing is a tricky problem space that we're not done exploring; the
better default behavior is to refresh the most local provider, without
considering freshness.

This also makes the implementation simpler because `refresh` no longer
needs to be bound to the provider fiber. Instead I traverse up the
fiber return path.
Removes the fresh/stale distinction from the context stack and instead
detects refreshes by comparing the previous and next parent cache.

This is closer to one of the earlier implementation drafts, and it's
essentially how you'd implement this in userspace using context. I had
moved away from this when I got off on a tangent thinking about how the
cache pool should work; once that fell into place, it became more clear
what the relationship is between the context stack, which you use for
updates ("Here"), and the cache pool, which you use for newly mounted
content ("There").

The only thing we're doing internally that can't really be achieved in
userspace is transfering the cache across Suspense retries. Kinda neat.
I missed a few lines when syncing an earlier step. Usually I would find
which one and patch it but I'm about to squash and merge so meh.
@acdlite acdlite force-pushed the cache branch 2 times, most recently from 59aea20 to 7c7d2ba Compare December 18, 2020 18:19
// it to `getSuspendedCachePool`. But factoring reasons, those two functions are
// in different phases/files. They are always called in sequence, though, so we
// can stash the value here temporarily.
let _suspendedPooledCache: Cache | null = null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the underscore about? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a weird hack so I wanted to make it ugly

@acdlite acdlite merged commit efc57e5 into facebook:master Dec 18, 2020
@tjallingt
Copy link
Contributor

So now this is merged; Am i understanding correctly that the idea here is that you can avoid "data tearing" by using the same cache for an entire tree because all components under the cache will read equally "out of date" data?

@Jack-Works
Copy link
Contributor

Cool, is there any user-land example of it so we can try this?

@bvaughn
Copy link
Contributor

bvaughn commented Feb 3, 2021

@Jack-Works This API has not been released except for our experimental NPM release. React DevTools builds from that release though and you can see an example of the new cache used in it if you'd like to: #20548

facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Feb 26, 2021
Summary:
This sync includes the following changes:
- **[0cf9fc10b](facebook/react@0cf9fc10b )**: Fix React Native flow types ([#20889](facebook/react#20889)) //<Ricky>//
- **[c581cdd48](facebook/react@c581cdd48 )**: Schedule sync updates in microtask ([#20872](facebook/react#20872)) //<Ricky>//
- **[90bde6505](facebook/react@90bde6505 )**: Add SuspenseList to react-is ([#20874](facebook/react#20874)) //<Brian Vaughn>//
- **[8336f19aa](facebook/react@8336f19aa )**: Update React Native types ([#20883](facebook/react#20883)) //<Rubén Norte>//
- **[9209c30ff](facebook/react@9209c30ff )**: Add StrictMode level prop and createRoot unstable_strictModeLevel option ([#20849](facebook/react#20849)) //<Brian Vaughn>//
- **[e5f6b91d2](facebook/react@e5f6b91d2 )**: Add Lane labels to scheduling profiler marks ([#20808](facebook/react#20808)) //<Brian Vaughn>//
- **[c62986cfd](facebook/react@c62986cfd )**: Add additional messaging for RulesOfHooks lint error ([#20692](facebook/react#20692)) //<Anthony Garritano>//
- **[78d2f2d30](facebook/react@78d2f2d30 )**: Fabric-compatible implementation of `JSReponder` feature ([#20768](facebook/react#20768)) //<Valentin Shergin>//
- **[4d28eca97](facebook/react@4d28eca97 )**: Land enableNonInterruptingNormalPri ([#20859](facebook/react#20859)) //<Ricky>//
- **[8af27aeed](facebook/react@8af27aeed )**: Remove scheduler sampling profiler shared array buffer ([#20840](facebook/react#20840)) //<Brian Vaughn>//
- **[af3d52611](facebook/react@af3d52611 )**: Disable (unstable) scheduler sampling profiler for OSS builds ([#20832](facebook/react#20832)) //<Brian Vaughn>//
- **[8fa0ccca0](facebook/react@8fa0ccca0 )**: fix: use SharedArrayBuffer only when cross-origin isolation is enabled ([#20831](facebook/react#20831)) //<Toru Kobayashi>//
- **[099164792](facebook/react@099164792 )**: Use setImmediate when available over MessageChannel ([#20834](facebook/react#20834)) //<Dan Abramov>//
- **[e2fd460cc](facebook/react@e2fd460cc )**: Bailout in sync task if work is not sync ([#20813](facebook/react#20813)) //<Andrew Clark>//
- **[1a7472624](facebook/react@1a7472624 )**: Add `supportsMicrotasks` to the host config ([#20809](facebook/react#20809)) //<Andrew Clark>//
- **[696e736be](facebook/react@696e736be )**: Warn if static flag is accidentally cleared ([#20807](facebook/react#20807)) //<Andrew Clark>//
- **[483358c38](facebook/react@483358c38 )**: Omit TransitionHydrationLane from TransitionLanes ([#20802](facebook/react#20802)) //<Andrew Clark>//
- **[78ec97d34](facebook/react@78ec97d34 )**: Fix typo ([#20466](facebook/react#20466)) //<inokawa>//
- **[6cdc35972](facebook/react@6cdc35972 )**: fix comments of markUpdateLaneFromFiberToRoot ([#20546](facebook/react#20546)) //<neroneroffy>//
- **[47dd9f441](facebook/react@47dd9f441 )**: Remove fakeCallbackNode ([#20799](facebook/react#20799)) //<Andrew Clark>//
- **[114ab5295](facebook/react@114ab5295 )**: Make remaining empty lanes Transition lanes ([#20793](facebook/react#20793)) //<Andrew Clark>//
- **[d3d2451a0](facebook/react@d3d2451a0 )**: Use a single lane per priority level ([#20791](facebook/react#20791)) //<Andrew Clark>//
- **[eee874ce6](facebook/react@eee874ce6 )**: Cross-fork lint: Support named export declaration ([#20784](facebook/react#20784)) //<Andrew Clark>//
- **[3b870b1e0](facebook/react@3b870b1e0 )**: Lane enableTransitionEntanglement flag ([#20775](facebook/react#20775)) //<Andrew Clark>//
- **[d1845ad0f](facebook/react@d1845ad0f )**: Default updates should not interrupt transitions ([#20771](facebook/react#20771)) //<Andrew Clark>//
- **[3499c343a](facebook/react@3499c343a )**: Apply #20778 to new fork, too ([#20782](facebook/react#20782)) //<Andrew Clark>//
- **[3d10eca24](facebook/react@3d10eca24 )**: Move scheduler priority check into ReactDOM ([#20778](facebook/react#20778)) //<Dan Abramov>//
- **[97fce318a](facebook/react@97fce318a )**: Experiment: Infer the current event priority from the native event ([#20748](facebook/react#20748)) //<Dan Abramov>//
- **[6c526c515](facebook/react@6c526c515 )**: Don't shift interleaved updates to separate lane ([#20681](facebook/react#20681)) //<Andrew Clark>//
- **[35f7441d3](facebook/react@35f7441d3 )**: Use Lanes instead of priority event constants ([#20762](facebook/react#20762)) //<Dan Abramov>//
- **[a014c915c](facebook/react@a014c915c )**: Parallel transitions: Assign different lanes to consecutive transitions ([#20672](facebook/react#20672)) //<Andrew Clark>//
- **[77754ae61](facebook/react@77754ae61 )**: Decouple event priority list from event name list ([#20760](facebook/react#20760)) //<Dan Abramov>//
- **[b5bac1821](facebook/react@b5bac1821 )**: Align event group constant naming with lane naming ([#20744](facebook/react#20744)) //<Dan Abramov>//
- **[4ecf11977](facebook/react@4ecf11977 )**: Remove the Fundamental internals ([#20745](facebook/react#20745)) //<Dan Abramov>//
- **[eeb1325b0](facebook/react@eeb1325b0 )**: Fix UMD bundles by removing usage of global ([#20743](facebook/react#20743)) //<Dan Abramov>//
- **[0935a1db3](facebook/react@0935a1db3 )**: Delete consolidateBundleSizes script ([#20724](facebook/react#20724)) //<Andrew Clark>//
- **[7cb9fd7ef](facebook/react@7cb9fd7ef )**: Land interleaved updates change in main fork ([#20710](facebook/react#20710)) //<Andrew Clark>//
- **[dc27b5aaa](facebook/react@dc27b5aaa )**: useMutableSource: Use StrictMode double render to detect render phase mutation ([#20698](facebook/react#20698)) //<Andrew Clark>//
- **[bb1b7951d](facebook/react@bb1b7951d )**: fix: don't run effects if a render phase update results in unchanged deps ([#20676](facebook/react#20676)) //<Sebastian Silbermann>//
- **[766a7a28a](facebook/react@766a7a28a )**: Improve React error message when mutable sources are mutated during render ([#20665](facebook/react#20665)) //<Brian Vaughn>//
- **[a922f1c71](facebook/react@a922f1c71 )**: Fix cache refresh bug that broke DevTools ([#20687](facebook/react#20687)) //<Andrew Clark>//
- **[e51bd6c1f](facebook/react@e51bd6c1f )**: Queue discrete events in microtask ([#20669](facebook/react#20669)) //<Ricky>//
- **[aa736a0fa](facebook/react@aa736a0fa )**: Add queue microtask to host configs ([#20668](facebook/react#20668)) //<Ricky>//
- **[deeeaf1d2](facebook/react@deeeaf1d2 )**: Entangle overlapping transitions per queue ([#20670](facebook/react#20670)) //<Andrew Clark>//
- **[e316f7855](facebook/react@e316f7855 )**: RN: Implement `sendAccessibilityEvent` in RN Renderer that proxies between Fabric/non-Fabric ([#20554](facebook/react#20554)) //<Joshua Gross>//
- **[9c32622cf](facebook/react@9c32622cf )**: Improve tests that use discrete events ([#20667](facebook/react#20667)) //<Ricky>//
- **[d13f5b953](facebook/react@d13f5b953 )**: Experiment: Unsuspend all lanes on update ([#20660](facebook/react#20660)) //<Andrew Clark>//
- **[a511dc709](facebook/react@a511dc709 )**: Error for deferred value and transition in Server Components ([#20657](facebook/react#20657)) //<Sebastian Markbåge>//
- **[fb3f63f1a](facebook/react@fb3f63f1a )**: Remove lazy invokation of segments ([#20656](facebook/react#20656)) //<Sebastian Markbåge>//
- **[895ae67fd](facebook/react@895ae67fd )**: Improve error boundary handling for unmounted subtrees ([#20645](facebook/react#20645)) //<Brian Vaughn>//
- **[f15f8f64b](facebook/react@f15f8f64b )**: Store interleaved updates on separate queue until end of render ([#20615](facebook/react#20615)) //<Andrew Clark>//
- **[0fd6805c6](facebook/react@0fd6805c6 )**: Land rest of effects refactor in main fork ([#20644](facebook/react#20644)) //<Andrew Clark>//
- **[a6b5256a2](facebook/react@a6b5256a2 )**: Refactored recursive strict effects method to be iterative ([#20642](facebook/react#20642)) //<Brian Vaughn>//
- **[3957853ae](facebook/react@3957853ae )**: Re-add "strict effects mode" for legacy roots only ([#20639](facebook/react#20639)) //<Brian Vaughn>//
- **[fceb75e89](facebook/react@fceb75e89 )**: Delete remaining references to effect list ([#20625](facebook/react#20625)) //<Andrew Clark>//
- **[741dcbdbe](facebook/react@741dcbdbe )**: Schedule passive phase whenever there's a deletion ([#20624](facebook/react#20624)) //<Andrew Clark>//
- **[11a983fc7](facebook/react@11a983fc7 )**: Remove references to Deletion flag ([#20623](facebook/react#20623)) //<Andrew Clark>//
- **[2e948e0d9](facebook/react@2e948e0d9 )**: Avoid .valueOf to close #20594 ([#20617](facebook/react#20617)) //<Dima Tisnek>//
- **[2a646f73e](facebook/react@2a646f73e )**: Convert snapshot phase to depth-first traversal ([#20622](facebook/react#20622)) //<Andrew Clark>//
- **[fb3e158a6](facebook/react@fb3e158a6 )**: Convert ReactSuspenseWithNoopRenderer tests to use built-in cache ([#20601](facebook/react#20601)) //<Andrew Clark>//
- **[e0fd9e67f](facebook/react@e0fd9e67f )**: Use update lane priority in work loop ([#20621](facebook/react#20621)) //<Ricky>//
- **[58e830448](facebook/react@58e830448 )**: Remove custom error message from hook access error ([#20604](facebook/react#20604)) //<Andrew Clark>//
- **[9043626f0](facebook/react@9043626f0 )**: Cache tests: Make it easier to test many caches ([#20600](facebook/react#20600)) //<Andrew Clark>//
- **[af0bb68e8](facebook/react@af0bb68e8 )**: Land #20595 and #20596 in main fork ([#20602](facebook/react#20602)) //<Andrew Clark>//
- **[2b6985114](facebook/react@2b6985114 )**: build-combined: Fix failures  when renaming across devices ([#20620](facebook/react#20620)) //<Sebastian Silbermann>//
- **[af16f755d](facebook/react@af16f755d )**: Update DevTools to use getCacheForType API ([#20548](facebook/react#20548)) //<Brian Vaughn>//
- **[95feb0e70](facebook/react@95feb0e70 )**: Convert mutation phase to depth-first traversal ([#20596](facebook/react#20596)) //<Andrew Clark>//
- **[6132919bf](facebook/react@6132919bf )**: Convert layout phase to depth-first traversal ([#20595](facebook/react#20595)) //<Andrew Clark>//
- **[42e04b46d](facebook/react@42e04b46d )**: Fix: Detach deleted fiber's alternate, too ([#20587](facebook/react#20587)) //<Andrew Clark>//
- **[a656ace8d](facebook/react@a656ace8d )**: Deletion effects should fire parent -> child ([#20584](facebook/react#20584)) //<Andrew Clark>//
- **[e6ed2bcf4](facebook/react@e6ed2bcf4 )**: Update package.json versions as part of build step ([#20579](facebook/react#20579)) //<Andrew Clark>//
- **[eb0fb3823](facebook/react@eb0fb3823 )**: Build stable and experimental with same command ([#20573](facebook/react#20573)) //<Andrew Clark>//
- **[e8eff119e](facebook/react@e8eff119e )**: Fix ESLint crash on empty react effect hook ([#20385](facebook/react#20385)) //<Christian Ruigrok>//
- **[27659559e](facebook/react@27659559e )**: Add useRefresh hook to react-debug-tools ([#20460](facebook/react#20460)) //<Brian Vaughn>//
- **[99554dc36](facebook/react@99554dc36 )**: Add Flight packages to experimental allowlist ([#20486](facebook/react#20486)) //<Andrew Clark>//
- **[efc57e5cb](facebook/react@efc57e5cb )**: Add built-in Suspense cache with support for invalidation (refreshing) ([#20456](facebook/react#20456)) //<Andrew Clark>//
- **[00a5b08e2](facebook/react@00a5b08e2 )**: Remove PassiveStatic optimization //<Andrew Clark>//
- **[a6329b105](facebook/react@a6329b105 )**: Don't clear static flags in resetWorkInProgress //<Andrew Clark>//
- **[1cf59f34b](facebook/react@1cf59f34b )**: Convert passive unmount phase to tree traversal //<Andrew Clark>//
- **[ab29695a0](facebook/react@ab29695a0 )**: Defer more field detachments to passive phase //<Andrew Clark>//
- **[d37d7a4bb](facebook/react@d37d7a4bb )**: Convert passive mount phase to tree traversal //<Andrew Clark>//
- **[19e15a398](facebook/react@19e15a398 )**: Add PassiveStatic to trees with passive effects //<Andrew Clark>//
- **[ff17fc176](facebook/react@ff17fc176 )**: Don't clear other flags when adding Deletion //<Andrew Clark>//
- **[5687864eb](facebook/react@5687864eb )**: Add back disableSchedulerTimeoutInWorkLoop flag ([#20482](facebook/react#20482)) //<Ricky>//
- **[9f338e5d7](facebook/react@9f338e5d7 )**: clone json obj in react native flight client host config parser ([#20474](facebook/react#20474)) //<Luna Ruan>//
- **[4e62fd271](facebook/react@4e62fd271 )**: clone json obj in relay flight client host config parser ([#20465](facebook/react#20465)) //<Luna Ruan>//
- **[070372cde](facebook/react@070372cde )**: [Flight] Fix webpack watch mode issue ([#20457](facebook/react#20457)) //<Dan Abramov>//
- **[0f80dd148](facebook/react@0f80dd148 )**: [Flight] Support concatenated modules in Webpack plugin ([#20449](facebook/react#20449)) //<Dan Abramov>//
- **[daf38ecdf](facebook/react@daf38ecdf )**: [Flight] Use lazy reference for existing modules ([#20445](facebook/react#20445)) //<Dan Abramov>//
- **[3f9205c33](facebook/react@3f9205c33 )**: Regression test: SuspenseList causes lost unmount ([#20433](facebook/react#20433)) //<Andrew Clark>//
- **[cdfde3ae1](facebook/react@cdfde3ae1 )**: Always rethrow original error when we replay errors ([#20425](facebook/react#20425)) //<Sebastian Markbåge>//
- **[b15d6e93e](facebook/react@b15d6e93e )**: [Flight] Make PG and FS server-only ([#20424](facebook/react#20424)) //<Dan Abramov>//
- **[40ff2395e](facebook/react@40ff2395e )**: [Flight] Prevent non-Server imports of aliased Server entrypoints ([#20422](facebook/react#20422)) //<Dan Abramov>//
- **[94aa365e3](facebook/react@94aa365e3 )**: [Flight] Fix webpack plugin to use chunk groups ([#20421](facebook/react#20421)) //<Dan Abramov>//
- **[842ee367e](facebook/react@842ee367e )**: [Flight] Rename the shared entry point ([#20420](facebook/react#20420)) //<Dan Abramov>//
- **[dbf40ef75](facebook/react@dbf40ef75 )**: Put .server.js at the end of bundle filenames ([#20419](facebook/react#20419)) //<Dan Abramov>//
- **[03126dd08](facebook/react@03126dd08 )**: [Flight] Add read-only fs methods ([#20412](facebook/react#20412)) //<Dan Abramov>//
- **[b51a686a9](facebook/react@b51a686a9 )**: Turn on double effects for www test renderer ([#20416](facebook/react#20416)) //<Brian Vaughn>//
- **[56a632adb](facebook/react@56a632adb )**: Double Invoke Effects in __DEV__ (in old reconciler fork) ([#20415](facebook/react#20415)) //<Brian Vaughn>//
- **[1a2422337](facebook/react@1a2422337 )**: fixed typo ([#20351](facebook/react#20351)) //<togami2864>//
- **[a233c9e2a](facebook/react@a233c9e2a )**: Rename internal cache helpers ([#20410](facebook/react#20410)) //<Dan Abramov>//
- **[6a4b12b81](facebook/react@6a4b12b81 )**: [Flight] Add rudimentary FS binding ([#20409](facebook/react#20409)) //<Dan Abramov>//
- **[7659949d6](facebook/react@7659949d6 )**: Clear `deletions` in `detachFiber` ([#20401](facebook/react#20401)) //<Andrew Clark>//
- **[b9680aef7](facebook/react@b9680aef7 )**: Cache react-fetch results in the Node version ([#20407](facebook/react#20407)) //<Dan Abramov>//
- **[cdae31ab8](facebook/react@cdae31ab8 )**: Fix typo ([#20279](facebook/react#20279)) //<inokawa>//
- **[51a7cfe21](facebook/react@51a7cfe21 )**: Fix typo ([#20300](facebook/react#20300)) //<Hollow Man>//
- **[373b297c5](facebook/react@373b297c5 )**: fix: Fix typo in react-reconciler docs ([#20284](facebook/react#20284)) //<Sam Zhou>//
- **[1b5ca9906](facebook/react@1b5ca9906 )**: Fix module ID deduplication ([#20406](facebook/react#20406)) //<Dan Abramov>//
- **[5fd9db732](facebook/react@5fd9db732 )**: [Flight] Rename react-transport-... packages to react-server-... ([#20403](facebook/react#20403)) //<Sebastian Markbåge>//
- **[ce40f1dc2](facebook/react@ce40f1dc2 )**: Use assets API + writeToDisk instead of directly writing to disk ([#20402](facebook/react#20402)) //<Sebastian Markbåge>//
- **[b66ae09b6](facebook/react@b66ae09b6 )**: Track subtreeFlags et al with bubbleProperties //<Andrew Clark>//
- **[de75315d7](facebook/react@de75315d7 )**: Track deletions using an array on the parent //<Andrew Clark>//
- **[1377e465d](facebook/react@1377e465d )**: Add Placement bit without removing others ([#20398](facebook/react#20398)) //<Andrew Clark>//
- **[18d7574ae](facebook/react@18d7574ae )**: Remove `catch` from Scheduler build ([#20396](facebook/react#20396)) //<Andrew Clark>//
- **[30dfb8602](facebook/react@30dfb8602 )**: [Flight] Basic scan of the file system to find Client modules ([#20383](facebook/react#20383)) //<Sebastian Markbåge>//
- **[9b8060041](facebook/react@9b8060041 )**: Error when the number of parameters to a query changes ([#20379](facebook/react#20379)) //<Dan Abramov>//
- **[60e4a76](facebook/react@60e4a76fa )**: [Flight] Add rudimentary PG binding ([#20372](facebook/react#20372)) //<Dan Abramov>//
- **[88ef95712](facebook/react@88ef95712 )**: Fork ReactFiberLane ([#20371](facebook/react#20371)) //<Andrew Clark>//
- **[41c5d00fc](facebook/react@41c5d00fc )**: [Flight] Minimal webpack plugin ([#20228](facebook/react#20228)) //<Dan Abramov>//
- **[e23673b51](facebook/react@e23673b51 )**: [Flight] Add getCacheForType() to the dispatcher ([#20315](facebook/react#20315)) //<Dan Abramov>//
- **[555eeae33](facebook/react@555eeae33 )**: Add disableNativeComponentFrames flag ([#20364](facebook/react#20364)) //<Philipp Spiess>//
- **[148ffe3cf](facebook/react@148ffe3cf )**: Failing test for Client reconciliation ([#20318](facebook/react#20318)) //<Dan Abramov>//
- **[a2a025537](facebook/react@a2a025537 )**: Fixed invalid DevTools work tags ([#20362](facebook/react#20362)) //<Brian Vaughn>//
- **[5711811da](facebook/react@5711811da )**: Reconcile element types of lazy component yielding the same type ([#20357](facebook/react#20357)) //<Sebastian Markbåge>//
- **[3f73dcee3](facebook/react@3f73dcee3 )**: Support named exports from client references ([#20312](facebook/react#20312)) //<Sebastian Markbåge>//
- **[565148d75](facebook/react@565148d75 )**: Disallow *.server.js imports from any other files ([#20309](facebook/react#20309)) //<Sebastian Markbåge>//
- **[e6a0f2763](facebook/react@e6a0f2763 )**: Profiler: Improve nested-update checks ([#20299](facebook/react#20299)) //<Brian Vaughn>//
- **[d93b58a5e](facebook/react@d93b58a5e )**: Add flight specific entry point for react package ([#20304](facebook/react#20304)) //<Sebastian Markbåge>//
- **[a81c02ac1](facebook/react@a81c02ac1 )**: Profiler onNestedUpdateScheduled accepts id as first param ([#20293](facebook/react#20293)) //<Brian Vaughn>//
- **[ac2cff4b1](facebook/react@ac2cff4b1 )**: Warn if commit phase error thrown in detached tree ([#20286](facebook/react#20286)) //<Andrew Clark>//
- **[0f83a64ed](facebook/react@0f83a64ed )**: Regression test: Missing unmount after re-order ([#20285](facebook/react#20285)) //<Andrew Clark>//
- **[ebf158965](facebook/react@ebf158965 )**: Add best-effort documentation for third-party renderers ([#20278](facebook/react#20278)) //<Dan Abramov>//
- **[82e99e1b0](facebook/react@82e99e1b0 )**: Add Node ESM Loader and Register Entrypoints ([#20274](facebook/react#20274)) //<Sebastian Markbåge>//
- **[bf7b7aeb1](facebook/react@bf7b7aeb1 )**: findDOMNode: Remove return pointer mutation ([#20272](facebook/react#20272)) //<Andrew Clark>//
- **[369c3db62](facebook/react@369c3db62 )**: Add separate ChildDeletion flag ([#20264](facebook/react#20264)) //<Andrew Clark>//
- **[765e89b90](facebook/react@765e89b90 )**: Reset new fork to old fork  ([#20254](facebook/react#20254)) //<Andrew Clark>//
- **[7548dd573](facebook/react@7548dd573 )**: Properly reset Profiler nested-update flag ([#20253](facebook/react#20253)) //<Brian Vaughn>//
- **[b44e4b13a](facebook/react@b44e4b13a )**: Check for deletions in `hadNoMutationsEffects` ([#20252](facebook/react#20252)) //<Andrew Clark>//
- **[3ebf05183](facebook/react@3ebf05183 )**: Add new effect fields to old fork, and vice versa ([#20246](facebook/react#20246)) //<Andrew Clark>//
- **[2fbcc9806](facebook/react@2fbcc9806 )**: Remove cycle between ReactFiberHooks and ReactInternalTypes ([#20242](facebook/react#20242)) //<Paul Doyle>//
- **[504222dcd](facebook/react@504222dcd )**: Add Node ESM build option ([#20243](facebook/react#20243)) //<Sebastian Markbåge>//
- **[1b96ee444](facebook/react@1b96ee444 )**: Remove noinline directives from new commit phase ([#20241](facebook/react#20241)) //<Andrew Clark>//
- **[760d9ab57](facebook/react@760d9ab57 )**: Scheduling profiler tweaks ([#20215](facebook/react#20215)) //<Brian Vaughn>//
- **[9403c3b53](facebook/react@9403c3b53 )**: Add Profiler callback when nested updates are scheduled ([#20211](facebook/react#20211)) //<Brian Vaughn>//
- **[62efd9618](facebook/react@62efd9618 )**: use-subscription@1.5.1 //<Dan Abramov>//
- **[e7006d67d](facebook/react@e7006d67d )**: Widen peer dependency range of use-subscription ([#20225](facebook/react#20225)) //<Billy Janitsch>//
- **[15df051c9](facebook/react@15df051c9 )**: Add warning if return pointer is inconsistent ([#20219](facebook/react#20219)) //<Andrew Clark>//
- **[9aca239f1](facebook/react@9aca239f1 )**: Improved dev experience when DevTools hook is disabled ([#20208](facebook/react#20208)) //<Alphabet Codes>//
- **[12627f93b](facebook/react@12627f93b )**: Perform hasOwnProperty check in Relay Flight ([#20220](facebook/react#20220)) //<Sebastian Markbåge>//
- **[163199d8c](facebook/react@163199d8c )**: Dedupe module id generation ([#20172](facebook/react#20172)) //<Sebastian Markbåge>//
- **[76a6dbcb9](facebook/react@76a6dbcb9 )**: [Flight] Encode Symbols as special rows that can be referenced by models … ([#20171](facebook/react#20171)) //<Sebastian Markbåge>//
- **[35e53b465](facebook/react@35e53b465 )**: [Flight] Simplify Relay row protocol ([#20168](facebook/react#20168)) //<Sebastian Markbåge>//
- **[16e6dadba](facebook/react@16e6dadba )**: Encode throwing server components as lazy throwing references ([#20217](facebook/react#20217)) //<Sebastian Markbåge>//
- **[c896cf961](facebook/react@c896cf961 )**: Set return pointer when reusing current tree ([#20212](facebook/react#20212)) //<Andrew Clark>//
- **[089866015](facebook/react@089866015 )**: Add version of scheduler that only swaps MessageChannel for postTask ([#20206](facebook/react#20206)) //<Ricky>//
- **[393c452e3](facebook/react@393c452e3 )**: Add "nested-update" phase to Profiler API ([#20163](facebook/react#20163)) //<Brian Vaughn>//
- **[13a62feab](facebook/react@13a62feab )**: Fix path for SchedulerFeatureFlags ([#20200](facebook/react#20200)) //<Ricky>//
- **[7a73d6a0f](facebook/react@7a73d6a0f )**: (Temporarily) revert unmounting error boundaries changes ([#20147](facebook/react#20147)) //<Brian Vaughn>//
- **[c29710a57](facebook/react@c29710a57 )**: fix: useImperativeMethods to useImperativeHandle ([#20194](facebook/react#20194)) //<Jack Works>//

jest_e2e[run_all_tests]

Changelog:
[General][Changed] - React Native sync for revisions c3e20f1...4d28eca

Reviewed By: mdvacca

Differential Revision: D26583597

fbshipit-source-id: a042df12c587fa9248d8de6f0b21b3ab231b3a7d
@Jack-Works
Copy link
Contributor

import type {} from 'react/experimental'
// @ts-expect-error
import { unstable_getCacheForType } from 'react'
export type Status<T> =
    | { type: 'pending'; value: Promise<void> }
    | { type: 'fulfilled'; value: T }
    | { type: 'rejected'; value: unknown }
export interface Resource<T> {
    /** Read the result, might trigger a suspense */
    read(): T
    /** This will not trigger a suspense */
    read_safe(): Status<T>
    /** Return a new resource */
    reload(): Resource<T>
}

export function createResource<Args extends any[], T>(
    f: (...args: Args) => Promise<T>,
    toCacheKey: (...args: Args) => unknown,
    weakMap = false,
): (...args: Args) => Resource<T> {
    function createMap() {
        return weakMap ? new WeakMap() : new Map()
    }
    function create(...args: Args) {
        const key = toCacheKey(...args)
        function read_safe() {
            const cache: Map<unknown, Status<T>> = unstable_getCacheForType(createMap)
            if (!cache.has(key))
                cache.set(key, {
                    type: 'pending',
                    value: f(...args).then(
                        (value) => void cache.set(key, { type: 'fulfilled', value }),
                        (value) => void cache.set(key, { type: 'rejected', value }),
                    ),
                })
            return cache.get(key)!
        }
        return {
            read() {
                const status = read_safe()
                if (status.type === 'fulfilled') return status.value
                throw status.value
            },
            read_safe,
            reload() {
                return create(...args)
            },
        }
    }
    return create
}

@bvaughn Hi is this usage correct?

facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Mar 17, 2021
Summary:
This sync includes the following changes:
- **[b9c4a01f7](facebook/react@b9c4a01f7 )**: Allow the streaming config to decide how to precompute or compute chunks ([#21008](facebook/react#21008)) //<Sebastian Markbåge>//
- **[c06d245fc](facebook/react@c06d245fc )**: Update devtools-extensions build script to reflect changes in local b… ([#21004](facebook/react#21004)) //<Hector Rincon>//
- **[14e4fd1ff](facebook/react@14e4fd1ff )**: [Fizz] Move DOM/Native format configs to their respective packages ([#20994](facebook/react#20994)) //<Sebastian Markbåge>//
- **[f2b6bf7c8](facebook/react@f2b6bf7c8 )**: [Fizz] Destroy the stream with an error if the root throws ([#20992](facebook/react#20992)) //<Sebastian Markbåge>//
- **[10cc40018](facebook/react@10cc40018 )**: Basic Fizz Architecture ([#20970](facebook/react#20970)) //<Sebastian Markbåge>//
- **[b7e631066](facebook/react@b7e631066 )**: Stop tracking roots with pending discrete updates ([#20978](facebook/react#20978)) //<Andrew Clark>//
- **[860f673](facebook/react@860f673a7 )**: Remove Blocking Mode (again) ([#20974](facebook/react#20974)) //<Ricky>//
- **[acde65469](facebook/react@acde65469 )**: Unify InputDiscreteLane with SyncLane ([#20968](facebook/react#20968)) //<Ricky>//
- **[6556e2a87](facebook/react@6556e2a87 )**: Cleaned up unused PassiveUnmountPendingDev DEV flag ([#20973](facebook/react#20973)) //<Brian Vaughn>//
- **[60182d64c](facebook/react@60182d64c )**: Cleanup tests using runWithPriority. ([#20958](facebook/react#20958)) //<Ricky>//
- **[e4d4b7074](facebook/react@e4d4b7074 )**: Land enableNativeEventPriorityInference ([#20955](facebook/react#20955)) //<Ricky>//
- **[73e900b0e](facebook/react@73e900b0e )**: Land enableDiscreteEventMicroTasks ([#20954](facebook/react#20954)) //<Ricky>//
- **[41e62e771](facebook/react@41e62e771 )**: Remove runWithPriority internally //<Rick Hanlon>//
- **[431e76e2d](facebook/react@431e76e2d )**: Switch callsites over to update lane priority //<Rick Hanlon>//
- **[e89d74ee6](facebook/react@e89d74ee6 )**: Remove decoupleUpdatePriorityFromScheduler //<Rick Hanlon>//
- **[ca15606d8](facebook/react@ca15606d8 )**: chore(build):  Ensure experimental builds exists on windows ([#20933](facebook/react#20933)) //<Sebastian Silbermann>//
- **[d74559746](facebook/react@d74559746 )**: Use update lane priority to set pending updates on roots ([#20918](facebook/react#20918)) //<Ricky>//
- **[f04bcb813](facebook/react@f04bcb813 )**: [Bugfix] Reset `subtreeFlags` in `resetWorkInProgress` ([#20948](facebook/react#20948)) //<Andrew Clark>//
- **[c7b449798](facebook/react@c7b449798 )**: [Experiment] Lazily propagate context changes ([#20890](facebook/react#20890)) //<Andrew Clark>//
- **[258b375a4](facebook/react@258b375a4 )**: Move context comparison to consumer //<Andrew Clark>//
- **[7df65725b](facebook/react@7df65725b )**: Split getComponentName into getComponentNameFromFiber and getComponentNameFromType ([#20940](facebook/react#20940)) //<Brian Vaughn>//
- **[ee4326357](facebook/react@ee4326357 )**: Revert "Remove blocking mode and blocking root ([#20888](facebook/react#20888))" ([#20916](facebook/react#20916)) //<Andrew Clark>//
- **[de0ee76db](facebook/react@de0ee76db )**: Add unstable_strictModeLevel to test renderer ([#20914](facebook/react#20914)) //<Andrew Clark>//
- **[d857f9e4d](facebook/react@d857f9e4d )**: Land enableSetImmediate feature flag ([#20906](facebook/react#20906)) //<Dan Abramov>//
- **[553440bd1](facebook/react@553440bd1 )**: Remove blocking mode and blocking root ([#20888](facebook/react#20888)) //<Ricky>//
- **[38f392ced](facebook/react@38f392ced )**: typo fix for the word 'Psuedo' ([#20894](facebook/react#20894)) //<Bowen>//
- **[0cf9fc10b](facebook/react@0cf9fc10b )**: Fix React Native flow types ([#20889](facebook/react#20889)) //<Ricky>//
- **[c581cdd48](facebook/react@c581cdd48 )**: Schedule sync updates in microtask ([#20872](facebook/react#20872)) //<Ricky>//
- **[90bde6505](facebook/react@90bde6505 )**: Add SuspenseList to react-is ([#20874](facebook/react#20874)) //<Brian Vaughn>//
- **[8336f19aa](facebook/react@8336f19aa )**: Update React Native types ([#20883](facebook/react#20883)) //<Rubén Norte>//
- **[9209c30ff](facebook/react@9209c30ff )**: Add StrictMode level prop and createRoot unstable_strictModeLevel option ([#20849](facebook/react#20849)) //<Brian Vaughn>//
- **[e5f6b91d2](facebook/react@e5f6b91d2 )**: Add Lane labels to scheduling profiler marks ([#20808](facebook/react#20808)) //<Brian Vaughn>//
- **[c62986cfd](facebook/react@c62986cfd )**: Add additional messaging for RulesOfHooks lint error ([#20692](facebook/react#20692)) //<Anthony Garritano>//
- **[78d2f2d30](facebook/react@78d2f2d30 )**: Fabric-compatible implementation of `JSReponder` feature ([#20768](facebook/react#20768)) //<Valentin Shergin>//
- **[4d28eca97](facebook/react@4d28eca97 )**: Land enableNonInterruptingNormalPri ([#20859](facebook/react#20859)) //<Ricky>//
- **[8af27aeed](facebook/react@8af27aeed )**: Remove scheduler sampling profiler shared array buffer ([#20840](facebook/react#20840)) //<Brian Vaughn>//
- **[af3d52611](facebook/react@af3d52611 )**: Disable (unstable) scheduler sampling profiler for OSS builds ([#20832](facebook/react#20832)) //<Brian Vaughn>//
- **[8fa0ccca0](facebook/react@8fa0ccca0 )**: fix: use SharedArrayBuffer only when cross-origin isolation is enabled ([#20831](facebook/react#20831)) //<Toru Kobayashi>//
- **[099164792](facebook/react@099164792 )**: Use setImmediate when available over MessageChannel ([#20834](facebook/react#20834)) //<Dan Abramov>//
- **[e2fd460cc](facebook/react@e2fd460cc )**: Bailout in sync task if work is not sync ([#20813](facebook/react#20813)) //<Andrew Clark>//
- **[1a7472624](facebook/react@1a7472624 )**: Add `supportsMicrotasks` to the host config ([#20809](facebook/react#20809)) //<Andrew Clark>//
- **[696e736be](facebook/react@696e736be )**: Warn if static flag is accidentally cleared ([#20807](facebook/react#20807)) //<Andrew Clark>//
- **[483358c38](facebook/react@483358c38 )**: Omit TransitionHydrationLane from TransitionLanes ([#20802](facebook/react#20802)) //<Andrew Clark>//
- **[78ec97d34](facebook/react@78ec97d34 )**: Fix typo ([#20466](facebook/react#20466)) //<inokawa>//
- **[6cdc35972](facebook/react@6cdc35972 )**: fix comments of markUpdateLaneFromFiberToRoot ([#20546](facebook/react#20546)) //<neroneroffy>//
- **[47dd9f441](facebook/react@47dd9f441 )**: Remove fakeCallbackNode ([#20799](facebook/react#20799)) //<Andrew Clark>//
- **[114ab5295](facebook/react@114ab5295 )**: Make remaining empty lanes Transition lanes ([#20793](facebook/react#20793)) //<Andrew Clark>//
- **[d3d2451a0](facebook/react@d3d2451a0 )**: Use a single lane per priority level ([#20791](facebook/react#20791)) //<Andrew Clark>//
- **[eee874ce6](facebook/react@eee874ce6 )**: Cross-fork lint: Support named export declaration ([#20784](facebook/react#20784)) //<Andrew Clark>//
- **[3b870b1e0](facebook/react@3b870b1e0 )**: Lane enableTransitionEntanglement flag ([#20775](facebook/react#20775)) //<Andrew Clark>//
- **[d1845ad0f](facebook/react@d1845ad0f )**: Default updates should not interrupt transitions ([#20771](facebook/react#20771)) //<Andrew Clark>//
- **[3499c343a](facebook/react@3499c343a )**: Apply #20778 to new fork, too ([#20782](facebook/react#20782)) //<Andrew Clark>//
- **[3d10eca24](facebook/react@3d10eca24 )**: Move scheduler priority check into ReactDOM ([#20778](facebook/react#20778)) //<Dan Abramov>//
- **[97fce318a](facebook/react@97fce318a )**: Experiment: Infer the current event priority from the native event ([#20748](facebook/react#20748)) //<Dan Abramov>//
- **[6c526c515](facebook/react@6c526c515 )**: Don't shift interleaved updates to separate lane ([#20681](facebook/react#20681)) //<Andrew Clark>//
- **[35f7441d3](facebook/react@35f7441d3 )**: Use Lanes instead of priority event constants ([#20762](facebook/react#20762)) //<Dan Abramov>//
- **[a014c915c](facebook/react@a014c915c )**: Parallel transitions: Assign different lanes to consecutive transitions ([#20672](facebook/react#20672)) //<Andrew Clark>//
- **[77754ae61](facebook/react@77754ae61 )**: Decouple event priority list from event name list ([#20760](facebook/react#20760)) //<Dan Abramov>//
- **[b5bac1821](facebook/react@b5bac1821 )**: Align event group constant naming with lane naming ([#20744](facebook/react#20744)) //<Dan Abramov>//
- **[4ecf11977](facebook/react@4ecf11977 )**: Remove the Fundamental internals ([#20745](facebook/react#20745)) //<Dan Abramov>//
- **[eeb1325b0](facebook/react@eeb1325b0 )**: Fix UMD bundles by removing usage of global ([#20743](facebook/react#20743)) //<Dan Abramov>//
- **[0935a1db3](facebook/react@0935a1db3 )**: Delete consolidateBundleSizes script ([#20724](facebook/react#20724)) //<Andrew Clark>//
- **[7cb9fd7ef](facebook/react@7cb9fd7ef )**: Land interleaved updates change in main fork ([#20710](facebook/react#20710)) //<Andrew Clark>//
- **[dc27b5aaa](facebook/react@dc27b5aaa )**: useMutableSource: Use StrictMode double render to detect render phase mutation ([#20698](facebook/react#20698)) //<Andrew Clark>//
- **[bb1b7951d](facebook/react@bb1b7951d )**: fix: don't run effects if a render phase update results in unchanged deps ([#20676](facebook/react#20676)) //<Sebastian Silbermann>//
- **[766a7a28a](facebook/react@766a7a28a )**: Improve React error message when mutable sources are mutated during render ([#20665](facebook/react#20665)) //<Brian Vaughn>//
- **[a922f1c71](facebook/react@a922f1c71 )**: Fix cache refresh bug that broke DevTools ([#20687](facebook/react#20687)) //<Andrew Clark>//
- **[e51bd6c1f](facebook/react@e51bd6c1f )**: Queue discrete events in microtask ([#20669](facebook/react#20669)) //<Ricky>//
- **[aa736a0fa](facebook/react@aa736a0fa )**: Add queue microtask to host configs ([#20668](facebook/react#20668)) //<Ricky>//
- **[deeeaf1d2](facebook/react@deeeaf1d2 )**: Entangle overlapping transitions per queue ([#20670](facebook/react#20670)) //<Andrew Clark>//
- **[e316f7855](facebook/react@e316f7855 )**: RN: Implement `sendAccessibilityEvent` in RN Renderer that proxies between Fabric/non-Fabric ([#20554](facebook/react#20554)) //<Joshua Gross>//
- **[9c32622cf](facebook/react@9c32622cf )**: Improve tests that use discrete events ([#20667](facebook/react#20667)) //<Ricky>//
- **[d13f5b953](facebook/react@d13f5b953 )**: Experiment: Unsuspend all lanes on update ([#20660](facebook/react#20660)) //<Andrew Clark>//
- **[a511dc709](facebook/react@a511dc709 )**: Error for deferred value and transition in Server Components ([#20657](facebook/react#20657)) //<Sebastian Markbåge>//
- **[fb3f63f1a](facebook/react@fb3f63f1a )**: Remove lazy invokation of segments ([#20656](facebook/react#20656)) //<Sebastian Markbåge>//
- **[895ae67fd](facebook/react@895ae67fd )**: Improve error boundary handling for unmounted subtrees ([#20645](facebook/react#20645)) //<Brian Vaughn>//
- **[f15f8f64b](facebook/react@f15f8f64b )**: Store interleaved updates on separate queue until end of render ([#20615](facebook/react#20615)) //<Andrew Clark>//
- **[0fd6805c6](facebook/react@0fd6805c6 )**: Land rest of effects refactor in main fork ([#20644](facebook/react#20644)) //<Andrew Clark>//
- **[a6b5256a2](facebook/react@a6b5256a2 )**: Refactored recursive strict effects method to be iterative ([#20642](facebook/react#20642)) //<Brian Vaughn>//
- **[3957853ae](facebook/react@3957853ae )**: Re-add "strict effects mode" for legacy roots only ([#20639](facebook/react#20639)) //<Brian Vaughn>//
- **[fceb75e89](facebook/react@fceb75e89 )**: Delete remaining references to effect list ([#20625](facebook/react#20625)) //<Andrew Clark>//
- **[741dcbdbe](facebook/react@741dcbdbe )**: Schedule passive phase whenever there's a deletion ([#20624](facebook/react#20624)) //<Andrew Clark>//
- **[11a983fc7](facebook/react@11a983fc7 )**: Remove references to Deletion flag ([#20623](facebook/react#20623)) //<Andrew Clark>//
- **[2e948e0d9](facebook/react@2e948e0d9 )**: Avoid .valueOf to close #20594 ([#20617](facebook/react#20617)) //<Dima Tisnek>//
- **[2a646f73e](facebook/react@2a646f73e )**: Convert snapshot phase to depth-first traversal ([#20622](facebook/react#20622)) //<Andrew Clark>//
- **[fb3e158a6](facebook/react@fb3e158a6 )**: Convert ReactSuspenseWithNoopRenderer tests to use built-in cache ([#20601](facebook/react#20601)) //<Andrew Clark>//
- **[e0fd9e67f](facebook/react@e0fd9e67f )**: Use update lane priority in work loop ([#20621](facebook/react#20621)) //<Ricky>//
- **[58e830448](facebook/react@58e830448 )**: Remove custom error message from hook access error ([#20604](facebook/react#20604)) //<Andrew Clark>//
- **[9043626f0](facebook/react@9043626f0 )**: Cache tests: Make it easier to test many caches ([#20600](facebook/react#20600)) //<Andrew Clark>//
- **[af0bb68e8](facebook/react@af0bb68e8 )**: Land #20595 and #20596 in main fork ([#20602](facebook/react#20602)) //<Andrew Clark>//
- **[2b6985114](facebook/react@2b6985114 )**: build-combined: Fix failures  when renaming across devices ([#20620](facebook/react#20620)) //<Sebastian Silbermann>//
- **[af16f755d](facebook/react@af16f755d )**: Update DevTools to use getCacheForType API ([#20548](facebook/react#20548)) //<Brian Vaughn>//
- **[95feb0e70](facebook/react@95feb0e70 )**: Convert mutation phase to depth-first traversal ([#20596](facebook/react#20596)) //<Andrew Clark>//
- **[6132919bf](facebook/react@6132919bf )**: Convert layout phase to depth-first traversal ([#20595](facebook/react#20595)) //<Andrew Clark>//
- **[42e04b46d](facebook/react@42e04b46d )**: Fix: Detach deleted fiber's alternate, too ([#20587](facebook/react#20587)) //<Andrew Clark>//
- **[a656ace8d](facebook/react@a656ace8d )**: Deletion effects should fire parent -> child ([#20584](facebook/react#20584)) //<Andrew Clark>//
- **[e6ed2bcf4](facebook/react@e6ed2bcf4 )**: Update package.json versions as part of build step ([#20579](facebook/react#20579)) //<Andrew Clark>//
- **[eb0fb3823](facebook/react@eb0fb3823 )**: Build stable and experimental with same command ([#20573](facebook/react#20573)) //<Andrew Clark>//
- **[e8eff119e](facebook/react@e8eff119e )**: Fix ESLint crash on empty react effect hook ([#20385](facebook/react#20385)) //<Christian Ruigrok>//
- **[27659559e](facebook/react@27659559e )**: Add useRefresh hook to react-debug-tools ([#20460](facebook/react#20460)) //<Brian Vaughn>//
- **[99554dc36](facebook/react@99554dc36 )**: Add Flight packages to experimental allowlist ([#20486](facebook/react#20486)) //<Andrew Clark>//
- **[efc57e5cb](facebook/react@efc57e5cb )**: Add built-in Suspense cache with support for invalidation (refreshing) ([#20456](facebook/react#20456)) //<Andrew Clark>//
- **[00a5b08e2](facebook/react@00a5b08e2 )**: Remove PassiveStatic optimization //<Andrew Clark>//
- **[a6329b105](facebook/react@a6329b105 )**: Don't clear static flags in resetWorkInProgress //<Andrew Clark>//
- **[1cf59f34b](facebook/react@1cf59f34b )**: Convert passive unmount phase to tree traversal //<Andrew Clark>//
- **[ab29695a0](facebook/react@ab29695a0 )**: Defer more field detachments to passive phase //<Andrew Clark>//
- **[d37d7a4bb](facebook/react@d37d7a4bb )**: Convert passive mount phase to tree traversal //<Andrew Clark>//
- **[19e15a398](facebook/react@19e15a398 )**: Add PassiveStatic to trees with passive effects //<Andrew Clark>//
- **[ff17fc176](facebook/react@ff17fc176 )**: Don't clear other flags when adding Deletion //<Andrew Clark>//
- **[5687864eb](facebook/react@5687864eb )**: Add back disableSchedulerTimeoutInWorkLoop flag ([#20482](facebook/react#20482)) //<Ricky>//
- **[9f338e5d7](facebook/react@9f338e5d7 )**: clone json obj in react native flight client host config parser ([#20474](facebook/react#20474)) //<Luna Ruan>//
- **[4e62fd271](facebook/react@4e62fd271 )**: clone json obj in relay flight client host config parser ([#20465](facebook/react#20465)) //<Luna Ruan>//
- **[070372cde](facebook/react@070372cde )**: [Flight] Fix webpack watch mode issue ([#20457](facebook/react#20457)) //<Dan Abramov>//
- **[0f80dd148](facebook/react@0f80dd148 )**: [Flight] Support concatenated modules in Webpack plugin ([#20449](facebook/react#20449)) //<Dan Abramov>//
- **[daf38ecdf](facebook/react@daf38ecdf )**: [Flight] Use lazy reference for existing modules ([#20445](facebook/react#20445)) //<Dan Abramov>//
- **[3f9205c33](facebook/react@3f9205c33 )**: Regression test: SuspenseList causes lost unmount ([#20433](facebook/react#20433)) //<Andrew Clark>//
- **[cdfde3ae1](facebook/react@cdfde3ae1 )**: Always rethrow original error when we replay errors ([#20425](facebook/react#20425)) //<Sebastian Markbåge>//
- **[b15d6e93e](facebook/react@b15d6e93e )**: [Flight] Make PG and FS server-only ([#20424](facebook/react#20424)) //<Dan Abramov>//
- **[40ff2395e](facebook/react@40ff2395e )**: [Flight] Prevent non-Server imports of aliased Server entrypoints ([#20422](facebook/react#20422)) //<Dan Abramov>//
- **[94aa365e3](facebook/react@94aa365e3 )**: [Flight] Fix webpack plugin to use chunk groups ([#20421](facebook/react#20421)) //<Dan Abramov>//
- **[842ee367e](facebook/react@842ee367e )**: [Flight] Rename the shared entry point ([#20420](facebook/react#20420)) //<Dan Abramov>//
- **[dbf40ef75](facebook/react@dbf40ef75 )**: Put .server.js at the end of bundle filenames ([#20419](facebook/react#20419)) //<Dan Abramov>//
- **[03126dd08](facebook/react@03126dd08 )**: [Flight] Add read-only fs methods ([#20412](facebook/react#20412)) //<Dan Abramov>//
- **[b51a686a9](facebook/react@b51a686a9 )**: Turn on double effects for www test renderer ([#20416](facebook/react#20416)) //<Brian Vaughn>//
- **[56a632adb](facebook/react@56a632adb )**: Double Invoke Effects in __DEV__ (in old reconciler fork) ([#20415](facebook/react#20415)) //<Brian Vaughn>//
- **[1a2422337](facebook/react@1a2422337 )**: fixed typo ([#20351](facebook/react#20351)) //<togami2864>//
- **[a233c9e2a](facebook/react@a233c9e2a )**: Rename internal cache helpers ([#20410](facebook/react#20410)) //<Dan Abramov>//
- **[6a4b12b81](facebook/react@6a4b12b81 )**: [Flight] Add rudimentary FS binding ([#20409](facebook/react#20409)) //<Dan Abramov>//
- **[7659949d6](facebook/react@7659949d6 )**: Clear `deletions` in `detachFiber` ([#20401](facebook/react#20401)) //<Andrew Clark>//
- **[b9680aef7](facebook/react@b9680aef7 )**: Cache react-fetch results in the Node version ([#20407](facebook/react#20407)) //<Dan Abramov>//
- **[cdae31ab8](facebook/react@cdae31ab8 )**: Fix typo ([#20279](facebook/react#20279)) //<inokawa>//
- **[51a7cfe21](facebook/react@51a7cfe21 )**: Fix typo ([#20300](facebook/react#20300)) //<Hollow Man>//
- **[373b297c5](facebook/react@373b297c5 )**: fix: Fix typo in react-reconciler docs ([#20284](facebook/react#20284)) //<Sam Zhou>//
- **[1b5ca9906](facebook/react@1b5ca9906 )**: Fix module ID deduplication ([#20406](facebook/react#20406)) //<Dan Abramov>//
- **[5fd9db732](facebook/react@5fd9db732 )**: [Flight] Rename react-transport-... packages to react-server-... ([#20403](facebook/react#20403)) //<Sebastian Markbåge>//
- **[ce40f1dc2](facebook/react@ce40f1dc2 )**: Use assets API + writeToDisk instead of directly writing to disk ([#20402](facebook/react#20402)) //<Sebastian Markbåge>//
- **[b66ae09b6](facebook/react@b66ae09b6 )**: Track subtreeFlags et al with bubbleProperties //<Andrew Clark>//
- **[de75315d7](facebook/react@de75315d7 )**: Track deletions using an array on the parent //<Andrew Clark>//
- **[1377e465d](facebook/react@1377e465d )**: Add Placement bit without removing others ([#20398](facebook/react#20398)) //<Andrew Clark>//
- **[18d7574ae](facebook/react@18d7574ae )**: Remove `catch` from Scheduler build ([#20396](facebook/react#20396)) //<Andrew Clark>//
- **[30dfb8602](facebook/react@30dfb8602 )**: [Flight] Basic scan of the file system to find Client modules ([#20383](facebook/react#20383)) //<Sebastian Markbåge>//
- **[9b8060041](facebook/react@9b8060041 )**: Error when the number of parameters to a query changes ([#20379](facebook/react#20379)) //<Dan Abramov>//
- **[60e4a76](facebook/react@60e4a76fa )**: [Flight] Add rudimentary PG binding ([#20372](facebook/react#20372)) //<Dan Abramov>//
- **[88ef95712](facebook/react@88ef95712 )**: Fork ReactFiberLane ([#20371](facebook/react#20371)) //<Andrew Clark>//
- **[41c5d00fc](facebook/react@41c5d00fc )**: [Flight] Minimal webpack plugin ([#20228](facebook/react#20228)) //<Dan Abramov>//
- **[e23673b51](facebook/react@e23673b51 )**: [Flight] Add getCacheForType() to the dispatcher ([#20315](facebook/react#20315)) //<Dan Abramov>//
- **[555eeae33](facebook/react@555eeae33 )**: Add disableNativeComponentFrames flag ([#20364](facebook/react#20364)) //<Philipp Spiess>//
- **[148ffe3cf](facebook/react@148ffe3cf )**: Failing test for Client reconciliation ([#20318](facebook/react#20318)) //<Dan Abramov>//
- **[a2a025537](facebook/react@a2a025537 )**: Fixed invalid DevTools work tags ([#20362](facebook/react#20362)) //<Brian Vaughn>//
- **[5711811da](facebook/react@5711811da )**: Reconcile element types of lazy component yielding the same type ([#20357](facebook/react#20357)) //<Sebastian Markbåge>//
- **[3f73dcee3](facebook/react@3f73dcee3 )**: Support named exports from client references ([#20312](facebook/react#20312)) //<Sebastian Markbåge>//
- **[565148d75](facebook/react@565148d75 )**: Disallow *.server.js imports from any other files ([#20309](facebook/react#20309)) //<Sebastian Markbåge>//
- **[e6a0f2763](facebook/react@e6a0f2763 )**: Profiler: Improve nested-update checks ([#20299](facebook/react#20299)) //<Brian Vaughn>//
- **[d93b58a5e](facebook/react@d93b58a5e )**: Add flight specific entry point for react package ([#20304](facebook/react#20304)) //<Sebastian Markbåge>//
- **[a81c02ac1](facebook/react@a81c02ac1 )**: Profiler onNestedUpdateScheduled accepts id as first param ([#20293](facebook/react#20293)) //<Brian Vaughn>//
- **[ac2cff4b1](facebook/react@ac2cff4b1 )**: Warn if commit phase error thrown in detached tree ([#20286](facebook/react#20286)) //<Andrew Clark>//
- **[0f83a64ed](facebook/react@0f83a64ed )**: Regression test: Missing unmount after re-order ([#20285](facebook/react#20285)) //<Andrew Clark>//
- **[ebf158965](facebook/react@ebf158965 )**: Add best-effort documentation for third-party renderers ([#20278](facebook/react#20278)) //<Dan Abramov>//
- **[82e99e1b0](facebook/react@82e99e1b0 )**: Add Node ESM Loader and Register Entrypoints ([#20274](facebook/react#20274)) //<Sebastian Markbåge>//
- **[bf7b7aeb1](facebook/react@bf7b7aeb1 )**: findDOMNode: Remove return pointer mutation ([#20272](facebook/react#20272)) //<Andrew Clark>//
- **[369c3db62](facebook/react@369c3db62 )**: Add separate ChildDeletion flag ([#20264](facebook/react#20264)) //<Andrew Clark>//
- **[765e89b90](facebook/react@765e89b90 )**: Reset new fork to old fork  ([#20254](facebook/react#20254)) //<Andrew Clark>//
- **[7548dd573](facebook/react@7548dd573 )**: Properly reset Profiler nested-update flag ([#20253](facebook/react#20253)) //<Brian Vaughn>//
- **[b44e4b13a](facebook/react@b44e4b13a )**: Check for deletions in `hadNoMutationsEffects` ([#20252](facebook/react#20252)) //<Andrew Clark>//
- **[3ebf05183](facebook/react@3ebf05183 )**: Add new effect fields to old fork, and vice versa ([#20246](facebook/react#20246)) //<Andrew Clark>//
- **[2fbcc9806](facebook/react@2fbcc9806 )**: Remove cycle between ReactFiberHooks and ReactInternalTypes ([#20242](facebook/react#20242)) //<Paul Doyle>//
- **[504222dcd](facebook/react@504222dcd )**: Add Node ESM build option ([#20243](facebook/react#20243)) //<Sebastian Markbåge>//
- **[1b96ee444](facebook/react@1b96ee444 )**: Remove noinline directives from new commit phase ([#20241](facebook/react#20241)) //<Andrew Clark>//
- **[760d9ab57](facebook/react@760d9ab57 )**: Scheduling profiler tweaks ([#20215](facebook/react#20215)) //<Brian Vaughn>//
- **[9403c3b53](facebook/react@9403c3b53 )**: Add Profiler callback when nested updates are scheduled ([#20211](facebook/react#20211)) //<Brian Vaughn>//
- **[62efd9618](facebook/react@62efd9618 )**: use-subscription@1.5.1 //<Dan Abramov>//
- **[e7006d67d](facebook/react@e7006d67d )**: Widen peer dependency range of use-subscription ([#20225](facebook/react#20225)) //<Billy Janitsch>//
- **[15df051c9](facebook/react@15df051c9 )**: Add warning if return pointer is inconsistent ([#20219](facebook/react#20219)) //<Andrew Clark>//
- **[9aca239f1](facebook/react@9aca239f1 )**: Improved dev experience when DevTools hook is disabled ([#20208](facebook/react#20208)) //<Alphabet Codes>//
- **[12627f93b](facebook/react@12627f93b )**: Perform hasOwnProperty check in Relay Flight ([#20220](facebook/react#20220)) //<Sebastian Markbåge>//
- **[163199d8c](facebook/react@163199d8c )**: Dedupe module id generation ([#20172](facebook/react#20172)) //<Sebastian Markbåge>//
- **[76a6dbcb9](facebook/react@76a6dbcb9 )**: [Flight] Encode Symbols as special rows that can be referenced by models … ([#20171](facebook/react#20171)) //<Sebastian Markbåge>//
- **[35e53b465](facebook/react@35e53b465 )**: [Flight] Simplify Relay row protocol ([#20168](facebook/react#20168)) //<Sebastian Markbåge>//
- **[16e6dadba](facebook/react@16e6dadba )**: Encode throwing server components as lazy throwing references ([#20217](facebook/react#20217)) //<Sebastian Markbåge>//
- **[c896cf961](facebook/react@c896cf961 )**: Set return pointer when reusing current tree ([#20212](facebook/react#20212)) //<Andrew Clark>//
- **[089866015](facebook/react@089866015 )**: Add version of scheduler that only swaps MessageChannel for postTask ([#20206](facebook/react#20206)) //<Ricky>//
- **[393c452e3](facebook/react@393c452e3 )**: Add "nested-update" phase to Profiler API ([#20163](facebook/react#20163)) //<Brian Vaughn>//
- **[13a62feab](facebook/react@13a62feab )**: Fix path for SchedulerFeatureFlags ([#20200](facebook/react#20200)) //<Ricky>//
- **[7a73d6a0f](facebook/react@7a73d6a0f )**: (Temporarily) revert unmounting error boundaries changes ([#20147](facebook/react#20147)) //<Brian Vaughn>//
- **[c29710a57](facebook/react@c29710a57 )**: fix: useImperativeMethods to useImperativeHandle ([#20194](facebook/react#20194)) //<Jack Works>//
- **[f8979e0e2](facebook/react@f8979e0e2 )**: Revert 'Fabric-compatible implementation of  feature' and have Fabric noop when setJSResponder is called for now ([#21009](facebook/react#21009)) //<Joshua Gross>//
- **[c9f6d0a3a](facebook/react@c9f6d0a3a )**: Sync `ReactNativeTypes` from React Native ([#21015](facebook/react#21015)) //<Timothy Yung>//

Changelog:
[General][Changed] - React Native sync for revisions c3e20f1...c9f6d0a

jest_e2e[run_all_tests]

Reviewed By: PeteTheHeat

Differential Revision: D27051885

fbshipit-source-id: 5b232f6093f5f2527f3b321bc8b5487934e92d70
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.

8 participants