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

Pass suspense config to startTransition instead of useTransition #17309

Closed
wants to merge 1 commit into from

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Nov 7, 2019

This avoids the problem of having to bind the config object to startTransition, invalidating downstream memoizations.

See #17284 for more details.

I'll need to codemod the existing callers in www, but that's not a blocker because www uses a userspace fork.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 7, 2019

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 d6db4ec:

Sandbox Source
priceless-dream-g0ipr Configuration

@sizebot
Copy link

sizebot commented Nov 7, 2019

Details of bundled changes.

Comparing: 8e74a31...d6db4ec

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.production.min.js -0.2% 0.0% 72.48 KB 72.37 KB 21.32 KB 21.33 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% -0.1% 2.85 KB 2.85 KB 1.24 KB 1.24 KB NODE_PROD
react-reconciler-persistent.development.js -0.1% -0.0% 602.71 KB 602.29 KB 126.76 KB 126.76 KB NODE_DEV
react-reconciler-persistent.production.min.js -0.2% 0.0% 72.49 KB 72.38 KB 21.33 KB 21.34 KB NODE_PROD
react-reconciler.development.js -0.1% -0.0% 605.24 KB 604.82 KB 127.86 KB 127.85 KB NODE_DEV
react-reconciler-reflection.development.js 0.0% -0.0% 19.08 KB 19.08 KB 6.23 KB 6.23 KB NODE_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom-server.browser.development.js 0.0% -0.0% 136.21 KB 136.21 KB 35.85 KB 35.85 KB NODE_DEV
react-dom.development.js -0.0% 0.0% 953.66 KB 953.24 KB 215.53 KB 215.54 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.87 KB 3.87 KB 1.54 KB 1.54 KB UMD_DEV
react-dom.production.min.js -0.1% -0.1% 116.26 KB 116.16 KB 37.48 KB 37.45 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.2 KB 1.2 KB 703 B 702 B UMD_PROD
react-dom.profiling.min.js -0.1% -0.0% 119.83 KB 119.73 KB 38.51 KB 38.51 KB UMD_PROFILING
react-dom.development.js -0.0% -0.0% 947.76 KB 947.33 KB 213.96 KB 213.95 KB NODE_DEV
react-dom.production.min.js -0.1% 0.0% 116.4 KB 116.29 KB 36.83 KB 36.85 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.04 KB 1.04 KB 634 B 633 B NODE_PROD
react-dom.profiling.min.js -0.1% -0.0% 120.09 KB 119.98 KB 37.88 KB 37.87 KB NODE_PROFILING
react-dom-server.node.development.js 0.0% -0.0% 137.32 KB 137.32 KB 36.08 KB 36.07 KB NODE_DEV
react-dom-test-utils.development.js 0.0% -0.0% 56.2 KB 56.2 KB 15.55 KB 15.55 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 11.17 KB 11.17 KB 4.14 KB 4.14 KB UMD_PROD
react-dom-unstable-fizz.node.development.js 0.0% -0.1% 4.4 KB 4.4 KB 1.64 KB 1.64 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.94 KB 10.94 KB 4.08 KB 4.08 KB NODE_PROD
react-dom-server.browser.production.min.js 0.0% 0.0% 19.93 KB 19.93 KB 7.38 KB 7.38 KB UMD_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js -0.1% 0.0% 673.54 KB 673.12 KB 146.06 KB 146.06 KB UMD_DEV
react-art.production.min.js -0.1% -0.1% 104.67 KB 104.57 KB 31.84 KB 31.82 KB UMD_PROD
react-art.development.js -0.1% -0.0% 604.21 KB 603.78 KB 128.68 KB 128.67 KB NODE_DEV
react-art.production.min.js -0.2% 0.0% 69.72 KB 69.6 KB 21.03 KB 21.03 KB NODE_PROD

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.1% -0.0% 618.41 KB 617.98 KB 131.74 KB 131.73 KB UMD_DEV
react-test-renderer.production.min.js -0.2% 🔺+0.1% 71.73 KB 71.62 KB 21.88 KB 21.9 KB UMD_PROD
react-test-renderer.development.js -0.1% -0.0% 613.68 KB 613.25 KB 130.54 KB 130.54 KB NODE_DEV
react-test-renderer.production.min.js -0.2% -0.0% 71.44 KB 71.32 KB 21.56 KB 21.56 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js -0.1% 0.0% 749.78 KB 749.27 KB 158.66 KB 158.67 KB RN_FB_DEV
ReactNativeRenderer-prod.js -0.2% -0.1% 277.75 KB 277.12 KB 47.49 KB 47.46 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.2% -0.0% 286.7 KB 286.08 KB 49.2 KB 49.18 KB RN_FB_PROFILING
ReactFabric-dev.js -0.1% 0.0% 755.18 KB 754.67 KB 159.49 KB 159.5 KB RN_FB_DEV
ReactFabric-prod.js -0.2% -0.0% 269.4 KB 268.77 KB 46.05 KB 46.03 KB RN_FB_PROD
ReactFabric-profiling.js -0.2% -0.0% 279.53 KB 278.91 KB 47.92 KB 47.9 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js -0.1% 0.0% 749.61 KB 749.09 KB 158.58 KB 158.59 KB RN_OSS_DEV
ReactNativeRenderer-prod.js -0.2% -0.1% 277.36 KB 276.73 KB 47.42 KB 47.39 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -0.2% -0.0% 286.32 KB 285.69 KB 49.13 KB 49.11 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.1% 0.0% 755 KB 754.49 KB 159.41 KB 159.42 KB RN_OSS_DEV
ReactFabric-prod.js -0.2% -0.0% 269.05 KB 268.42 KB 45.97 KB 45.95 KB RN_OSS_PROD
ReactFabric-profiling.js -0.2% -0.0% 279.19 KB 278.56 KB 47.85 KB 47.83 KB RN_OSS_PROFILING

ReactDOM: size: -0.1%, gzip: -0.1%

Size changes (stable)

Generated by 🚫 dangerJS against d6db4ec

@sizebot
Copy link

sizebot commented Nov 7, 2019

Details of bundled changes.

Comparing: 8e74a31...d6db4ec

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-prod.js -0.2% -0.0% 269.41 KB 268.79 KB 46.06 KB 46.04 KB RN_FB_PROD
ReactNativeRenderer-dev.js -0.1% 0.0% 749.62 KB 749.11 KB 158.59 KB 158.6 KB RN_OSS_DEV
ReactFabric-profiling.js -0.2% -0.0% 279.54 KB 278.92 KB 47.93 KB 47.91 KB RN_FB_PROFILING
ReactNativeRenderer-prod.js -0.2% -0.1% 277.76 KB 277.13 KB 47.5 KB 47.47 KB RN_FB_PROD
ReactNativeRenderer-profiling.js -0.2% -0.0% 286.71 KB 286.09 KB 49.21 KB 49.19 KB RN_FB_PROFILING
ReactFabric-dev.js -0.1% 0.0% 755.01 KB 754.5 KB 159.41 KB 159.42 KB RN_OSS_DEV
ReactFabric-prod.js -0.2% -0.0% 269.06 KB 268.44 KB 45.98 KB 45.96 KB RN_OSS_PROD
ReactFabric-profiling.js -0.2% -0.0% 279.2 KB 278.57 KB 47.86 KB 47.84 KB RN_OSS_PROFILING
ReactFabric-dev.js -0.1% 0.0% 755.19 KB 754.68 KB 159.5 KB 159.5 KB RN_FB_DEV
ReactNativeRenderer-prod.js -0.2% -0.1% 277.37 KB 276.74 KB 47.43 KB 47.4 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js -0.2% -0.0% 286.33 KB 285.7 KB 49.14 KB 49.12 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js -0.1% 0.0% 749.79 KB 749.28 KB 158.67 KB 158.68 KB RN_FB_DEV

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js -0.1% -0.0% 618.44 KB 618.01 KB 131.75 KB 131.74 KB UMD_DEV
react-test-renderer.production.min.js -0.2% 🔺+0.1% 71.76 KB 71.65 KB 21.89 KB 21.92 KB UMD_PROD
ReactTestRenderer-dev.js -0.1% 0.0% 629.25 KB 628.74 KB 130.92 KB 130.92 KB FB_WWW_DEV
react-test-renderer-shallow.development.js 0.0% 0.0% 39.11 KB 39.11 KB 10.01 KB 10.01 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 11.6 KB 11.6 KB 3.58 KB 3.58 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% -0.0% 33.07 KB 33.07 KB 8.54 KB 8.53 KB NODE_DEV
react-test-renderer.development.js -0.1% -0.0% 613.71 KB 613.28 KB 130.56 KB 130.55 KB NODE_DEV
react-test-renderer.production.min.js -0.2% -0.0% 71.46 KB 71.35 KB 21.58 KB 21.58 KB NODE_PROD

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js -0.1% 0.0% 123.64 KB 123.53 KB 38.81 KB 38.83 KB NODE_PROFILING
react-dom-server.browser.production.min.js 0.0% 0.0% 20.39 KB 20.39 KB 7.48 KB 7.48 KB UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.88 KB 3.88 KB 1.55 KB 1.55 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 11.18 KB 11.18 KB 4.15 KB 4.15 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.1% 1.21 KB 1.21 KB 711 B 710 B UMD_PROD
ReactDOMServer-dev.js 0.0% -0.0% 139.57 KB 139.57 KB 35.4 KB 35.4 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% -0.0% 54.48 KB 54.48 KB 15.22 KB 15.22 KB NODE_DEV
ReactDOMServer-prod.js 0.0% 0.0% 48.79 KB 48.79 KB 11.13 KB 11.13 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 3.71 KB 3.71 KB 1.5 KB 1.5 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.95 KB 10.95 KB 4.09 KB 4.09 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% -0.2% 1.05 KB 1.05 KB 642 B 641 B NODE_PROD
react-dom.development.js -0.0% 0.0% 953.68 KB 953.26 KB 215.55 KB 215.56 KB UMD_DEV
react-dom.production.min.js -0.1% 🔺+0.1% 119.67 KB 119.57 KB 38.42 KB 38.45 KB UMD_PROD
react-dom.profiling.min.js -0.1% 0.0% 123.35 KB 123.25 KB 39.49 KB 39.5 KB UMD_PROFILING
react-dom.development.js -0.0% -0.0% 947.78 KB 947.36 KB 213.98 KB 213.98 KB NODE_DEV
react-dom-server.node.development.js 0.0% -0.0% 137.35 KB 137.35 KB 36.08 KB 36.08 KB NODE_DEV
react-dom.production.min.js -0.1% 🔺+0.1% 119.84 KB 119.73 KB 37.77 KB 37.79 KB NODE_PROD
react-dom-server.node.production.min.js 0.0% -0.0% 20.72 KB 20.72 KB 7.61 KB 7.61 KB NODE_PROD
react-dom-server.browser.development.js 0.0% -0.0% 136.24 KB 136.24 KB 35.85 KB 35.85 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% -0.0% 20.31 KB 20.31 KB 7.46 KB 7.46 KB NODE_PROD
ReactDOM-dev.js -0.1% 0.0% 975.9 KB 975.39 KB 216.5 KB 216.51 KB FB_WWW_DEV
ReactDOM-prod.js -0.2% -0.0% 402.8 KB 402.17 KB 73.25 KB 73.23 KB FB_WWW_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 59.82 KB 59.82 KB 15.66 KB 15.66 KB NODE_DEV
ReactDOM-profiling.js -0.2% -0.0% 403.72 KB 403.09 KB 73.79 KB 73.78 KB FB_WWW_PROFILING
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.21 KB 1.21 KB 698 B 697 B NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-dev.js -0.1% 0.0% 617.68 KB 617.17 KB 128.37 KB 128.38 KB FB_WWW_DEV
ReactART-prod.js -0.3% -0.0% 236.28 KB 235.65 KB 39.7 KB 39.69 KB FB_WWW_PROD
react-art.development.js -0.1% 0.0% 673.56 KB 673.14 KB 146.06 KB 146.07 KB UMD_DEV
react-art.production.min.js -0.1% 0.0% 106.75 KB 106.65 KB 32.36 KB 32.36 KB UMD_PROD
react-art.development.js -0.1% -0.0% 604.23 KB 603.8 KB 128.68 KB 128.68 KB NODE_DEV
react-art.production.min.js -0.2% 0.0% 71.75 KB 71.64 KB 21.48 KB 21.48 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler-persistent.development.js -0.1% -0.0% 602.73 KB 602.3 KB 126.77 KB 126.76 KB NODE_DEV
react-reconciler-persistent.production.min.js -0.2% 🔺+0.1% 72.51 KB 72.39 KB 21.33 KB 21.35 KB NODE_PROD
react-reconciler.development.js -0.1% -0.0% 605.26 KB 604.83 KB 127.86 KB 127.85 KB NODE_DEV
react-reconciler.production.min.js -0.2% 0.0% 74.78 KB 74.67 KB 21.89 KB 21.9 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against d6db4ec

@gaearon
Copy link
Collaborator

gaearon commented Nov 7, 2019

Wanna update the docs? 😄

@gaearon
Copy link
Collaborator

gaearon commented Nov 7, 2019

j/k. I can do it.

@acdlite
Copy link
Collaborator Author

acdlite commented Nov 8, 2019

@gaearon Not sure if we've reached consensus on the API change yet, just preparing this PR for when we do. But yeah I was planning to update the docs once it lands :)

...instead of `useTransition`.

This avoids the problem of having to bind the config object to
`startTransition`, invalidating downstream memoizations.
@necolas necolas added the React Core Team Opened by a member of the React Core Team label Jan 8, 2020
@acdlite
Copy link
Collaborator Author

acdlite commented Jan 23, 2020

Haven't abandoned this. Still need to decide on final API.

@acdlite
Copy link
Collaborator Author

acdlite commented Sep 30, 2020

Closed by #19703

@acdlite acdlite closed this Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants