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

[Bugfix] Passive effects triggered by synchronous renders in a multi-root app #17347

Merged
merged 2 commits into from
Nov 12, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Nov 12, 2019

The bug

In a multi-root app, certain passive effects (useEffect) are never fired. See #17066.

The underlying problem

The implicit contract of flushPassiveEffects is that, right after calling it, there should be no pending passive effects. In the normal case, in concurrent mode, this is true. But the current implementation fails to account for the case where a passive effect schedules synchronous work, which in turn schedules additional passive effects.

This led to rootWithPendingPassiveEffects being overwritten in the commit phase, because an assignment that assumed it was replacing null was actually replacing a reference to another root, which has the consequence of dropping passive effects on that root.

The fix

The fix I've chosen here is, at the beginning of the commit phase, keep flushing passive effects in a loop until there are no more.

This doesn't not change the "public" implementation of flushPassiveEffects, though it arguably should work this way, too. I say "public" because it's only used by implementation layers on top of React which we control: mainly, the legacy version of act that does not use the mock Scheduler build. So there's probably still a bug in that act implementation.

I will address act in a follow-up. The ideal solution is to replace the legacy act with one implemented directly in the renderer, using a special testing-only build of React DOM. Since that requires a breaking change, we'll need an interim solution. We could make the "public" act
recursively flush effects in a loop, as I've done for the commit phase. However, I think a better solution is to stop automatically flushing the synchronous update queue at the end of flushPassiveEffects, and instead require the caller to explicitly call flushSyncUpdateQueue (or the equivalent) if needed. This follows the same pattern we use internally in the work loop, which is designed to avoid factoring hazards like the one that resulted in this bug.

The bug
-------

In a multi-root app, certain passive effects (`useEffect`) are never
fired. See facebook#17066.

The underlying problem
----------------------

The implicit contract of `flushPassiveEffects` is that, right after
calling it, there should be no pending passive effects. In the normal
case, in concurrent mode, this is true. But the current implementation
fails to account for the case where a passive effect schedules
synchronous work, which in turn schedules additional passive effects.

This led to `rootWithPendingPassiveEffects` being overwritten in the
commit phase, because an assignment that assumed it was replacing null
was actually replacing a reference to another root, which has the
consequence of dropping passive effects on that root.

The fix
-------

The fix I've chosen here is, at the beginning of the commit phase, keep
flushing passive effects in a loop until there are no more.

This doesn't not change the "public" implementation of
`flushPassiveEffects`, though it arguably should work this way, too. I
say "public" because it's only used by implementation layers on top of
React which we control: mainly, the legacy version of `act` that does
not use the mock Scheduler build. So there's probably still a bug
in that `act` implementation.

I will address `act` in a follow-up. The ideal solution is to replace
the legacy `act` with one implemented directly in the renderer, using a
special testing-only build of React DOM. Since that requires a breaking
change, we'll need an interim solution. We could make the "public" `act`
recursively flush effects in a loop, as I've done for the commit phase.
However, I think a better solution is to stop automatically flushing the
synchronous update queue at the end of `flushPassiveEffects`, and
instead require the caller to explicitly call `flushSyncUpdateQueue` (or
the equivalent) if needed. This follows the same pattern we use
internally in the work loop, which is designed to avoid factoring
hazards like the one that resulted in this bug.
@sizebot
Copy link

sizebot commented Nov 12, 2019

Details of bundled changes.

Comparing: 2c6ea0b...c386a55

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.production.min.js 0.0% 0.0% 72.46 KB 72.48 KB 21.32 KB 21.32 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% 🔺+0.2% 2.85 KB 2.85 KB 1.23 KB 1.24 KB NODE_PROD
react-reconciler-persistent.development.js +0.1% +0.1% 602.13 KB 602.6 KB 126.6 KB 126.74 KB NODE_DEV
react-reconciler-persistent.production.min.js 0.0% 0.0% 72.47 KB 72.49 KB 21.32 KB 21.33 KB NODE_PROD
react-reconciler.development.js +0.1% +0.1% 604.66 KB 605.13 KB 127.7 KB 127.83 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-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.46 KB 10.46 KB 3.56 KB 3.57 KB NODE_PROD
react-dom-unstable-flight-server.browser.production.min.js 0.0% 🔺+0.2% 2.64 KB 2.64 KB 1.25 KB 1.25 KB NODE_PROD
react-dom-unstable-flight-client.development.js 0.0% +0.1% 8.7 KB 8.7 KB 2.59 KB 2.59 KB UMD_DEV
react-dom-unstable-flight-client.production.min.js 0.0% 🔺+0.1% 2.88 KB 2.88 KB 1.33 KB 1.34 KB UMD_PROD
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-unstable-flight-server.node.development.js 0.0% 0.0% 10.02 KB 10.02 KB 3.26 KB 3.26 KB NODE_DEV
react-dom.development.js 0.0% +0.1% 952.68 KB 953.15 KB 215.31 KB 215.44 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.85 KB 19.85 KB 7.38 KB 7.38 KB NODE_PROD
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-unstable-flight-server.node.production.min.js 0.0% 🔺+0.1% 2.8 KB 2.8 KB 1.28 KB 1.28 KB NODE_PROD
react-dom.production.min.js 0.0% 0.0% 116.22 KB 116.24 KB 37.45 KB 37.46 KB UMD_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.2 KB 1.2 KB 701 B 703 B UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 119.79 KB 119.81 KB 38.51 KB 38.52 KB UMD_PROFILING
react-dom.development.js 0.0% +0.1% 946.79 KB 947.26 KB 213.73 KB 213.87 KB NODE_DEV
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.7 KB 3.7 KB 1.49 KB 1.5 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 116.36 KB 116.38 KB 36.83 KB 36.83 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.13 KB 60.13 KB 15.79 KB 15.79 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.04 KB 1.04 KB 632 B 634 B NODE_PROD
react-dom-unstable-flight-server.browser.development.js 0.0% +0.1% 9.32 KB 9.32 KB 3.06 KB 3.06 KB UMD_DEV
react-dom.profiling.min.js 0.0% 0.0% 120.05 KB 120.07 KB 37.87 KB 37.87 KB NODE_PROFILING
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.72 KB 10.72 KB 3.66 KB 3.67 KB UMD_PROD
react-dom-unstable-flight-server.browser.production.min.js 0.0% 🔺+0.1% 2.83 KB 2.83 KB 1.32 KB 1.33 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 59.8 KB 59.8 KB 15.65 KB 15.66 KB NODE_DEV
react-dom-unstable-flight-server.browser.development.js 0.0% +0.1% 9.12 KB 9.12 KB 3.01 KB 3.01 KB NODE_DEV
react-dom-server.node.development.js 0.0% 0.0% 137.32 KB 137.32 KB 36.07 KB 36.08 KB NODE_DEV
react-dom-unstable-flight-client.development.js 0.0% +0.1% 8.53 KB 8.53 KB 2.54 KB 2.55 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-server.node.production.min.js 0.0% 0.0% 20.26 KB 20.26 KB 7.53 KB 7.53 KB NODE_PROD
react-dom-unstable-flight-client.production.min.js 0.0% 🔺+0.2% 2.71 KB 2.71 KB 1.27 KB 1.28 KB NODE_PROD
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-test-utils.development.js 0.0% 0.0% 54.47 KB 54.47 KB 15.21 KB 15.21 KB NODE_DEV
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.development.js 0.0% 0.0% 140.28 KB 140.28 KB 36.85 KB 36.85 KB UMD_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.1% 1.2 KB 1.2 KB 688 B 689 B NODE_PROD
react-dom-server.browser.production.min.js 0.0% 0.0% 19.93 KB 19.93 KB 7.38 KB 7.39 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.1% 672.97 KB 673.44 KB 145.9 KB 146.04 KB UMD_DEV
react-art.production.min.js 0.0% 0.0% 104.65 KB 104.67 KB 31.83 KB 31.84 KB UMD_PROD
react-art.development.js +0.1% +0.1% 603.64 KB 604.11 KB 128.52 KB 128.66 KB NODE_DEV
react-art.production.min.js 0.0% 0.0% 69.7 KB 69.72 KB 21.02 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.1% 617.84 KB 618.31 KB 131.57 KB 131.71 KB UMD_DEV
react-test-renderer.production.min.js 0.0% 0.0% 71.71 KB 71.73 KB 21.87 KB 21.88 KB UMD_PROD
react-test-renderer.development.js +0.1% +0.1% 613.11 KB 613.58 KB 130.38 KB 130.52 KB NODE_DEV
react-test-renderer.production.min.js 0.0% 0.0% 71.42 KB 71.44 KB 21.55 KB 21.56 KB NODE_PROD
react-test-renderer-shallow.development.js 0.0% -0.0% 39.1 KB 39.1 KB 10 KB 10 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 11.58 KB 11.58 KB 3.57 KB 3.58 KB UMD_PROD
react-test-renderer-shallow.development.js 0.0% 0.0% 33.05 KB 33.05 KB 8.53 KB 8.53 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% 🔺+0.1% 11.72 KB 11.72 KB 3.68 KB 3.68 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.1% 748.85 KB 749.32 KB 158.42 KB 158.58 KB RN_FB_DEV
ReactNativeRenderer-prod.js 0.0% 0.0% 277.36 KB 277.41 KB 47.42 KB 47.43 KB RN_FB_PROD
ReactNativeRenderer-profiling.js 0.0% 0.0% 286.32 KB 286.37 KB 49.14 KB 49.15 KB RN_FB_PROFILING
ReactFabric-dev.js +0.1% +0.1% 754.4 KB 754.86 KB 159.25 KB 159.4 KB RN_FB_DEV
ReactFabric-prod.js 0.0% 0.0% 269.07 KB 269.13 KB 46 KB 46.01 KB RN_FB_PROD
ReactFabric-profiling.js 0.0% 0.0% 279.21 KB 279.26 KB 47.88 KB 47.88 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js +0.1% +0.1% 748.68 KB 749.14 KB 158.34 KB 158.5 KB RN_OSS_DEV
ReactNativeRenderer-prod.js 0.0% 0.0% 277.21 KB 277.26 KB 47.37 KB 47.38 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% 0.0% 286.17 KB 286.23 KB 49.09 KB 49.1 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.1% +0.1% 754.21 KB 754.68 KB 159.17 KB 159.33 KB RN_OSS_DEV
ReactFabric-prod.js 0.0% 0.0% 268.9 KB 268.96 KB 45.95 KB 45.95 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% 0.0% 279.04 KB 279.09 KB 47.83 KB 47.83 KB RN_OSS_PROFILING

ReactDOM: size: 0.0%, gzip: 🔺+0.1%

Size changes (stable)

Generated by 🚫 dangerJS against c386a55

@sizebot
Copy link

sizebot commented Nov 12, 2019

Details of bundled changes.

Comparing: 2c6ea0b...c386a55

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.1% 617.87 KB 618.33 KB 131.58 KB 131.72 KB UMD_DEV
react-test-renderer.production.min.js 0.0% 0.0% 71.74 KB 71.76 KB 21.89 KB 21.9 KB UMD_PROD
ReactTestRenderer-dev.js +0.1% +0.1% 628.68 KB 629.15 KB 130.72 KB 130.89 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.1% 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.53 KB 8.54 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% 🔺+0.1% 11.73 KB 11.73 KB 3.69 KB 3.69 KB NODE_PROD
react-test-renderer.development.js +0.1% +0.1% 613.13 KB 613.6 KB 130.39 KB 130.53 KB NODE_DEV
react-test-renderer.production.min.js 0.0% 0.0% 71.44 KB 71.46 KB 21.57 KB 21.58 KB NODE_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactFabric-prod.js 0.0% 0.0% 269.09 KB 269.14 KB 46.01 KB 46.02 KB RN_FB_PROD
ReactNativeRenderer-dev.js +0.1% +0.1% 748.69 KB 749.16 KB 158.35 KB 158.5 KB RN_OSS_DEV
ReactFabric-profiling.js 0.0% 0.0% 279.22 KB 279.27 KB 47.89 KB 47.89 KB RN_FB_PROFILING
ReactNativeRenderer-prod.js 0.0% 0.0% 277.37 KB 277.43 KB 47.43 KB 47.44 KB RN_FB_PROD
ReactNativeRenderer-profiling.js 0.0% 0.0% 286.33 KB 286.38 KB 49.15 KB 49.16 KB RN_FB_PROFILING
ReactFabric-dev.js +0.1% +0.1% 754.23 KB 754.69 KB 159.18 KB 159.33 KB RN_OSS_DEV
ReactFabric-prod.js 0.0% 0.0% 268.92 KB 268.97 KB 45.96 KB 45.96 KB RN_OSS_PROD
ReactFabric-profiling.js 0.0% 0.0% 279.05 KB 279.11 KB 47.83 KB 47.84 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.1% +0.1% 754.41 KB 754.88 KB 159.26 KB 159.41 KB RN_FB_DEV
ReactNativeRenderer-prod.js 0.0% 0.0% 277.23 KB 277.28 KB 47.38 KB 47.39 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js 0.0% 0.0% 286.19 KB 286.24 KB 49.1 KB 49.11 KB RN_OSS_PROFILING
ReactNativeRenderer-dev.js +0.1% +0.1% 748.86 KB 749.33 KB 158.43 KB 158.58 KB RN_FB_DEV

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js 0.0% 0.0% 123.6 KB 123.62 KB 38.8 KB 38.81 KB NODE_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 140.3 KB 140.3 KB 36.85 KB 36.85 KB UMD_DEV
react-dom-unstable-flight-server.browser.development.js 0.0% +0.1% 9.34 KB 9.34 KB 3.06 KB 3.07 KB UMD_DEV
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-flight-server.browser.production.min.js 0.0% 🔺+0.1% 2.85 KB 2.85 KB 1.33 KB 1.33 KB UMD_PROD
react-dom-test-utils.development.js 0.0% 0.0% 56.21 KB 56.21 KB 15.55 KB 15.55 KB UMD_DEV
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-unstable-flight-client.development.js 0.0% +0.1% 8.72 KB 8.72 KB 2.59 KB 2.6 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.3% 1.21 KB 1.21 KB 709 B 711 B UMD_PROD
react-dom-unstable-flight-client.production.min.js 0.0% 🔺+0.1% 2.89 KB 2.89 KB 1.34 KB 1.34 KB 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-unstable-flight-client.development.js 0.0% +0.1% 8.54 KB 8.54 KB 2.55 KB 2.55 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.3% 1.05 KB 1.05 KB 640 B 642 B NODE_PROD
react-dom-unstable-flight-client.production.min.js 0.0% 🔺+0.2% 2.72 KB 2.72 KB 1.28 KB 1.28 KB NODE_PROD
react-dom.development.js 0.0% +0.1% 952.71 KB 953.17 KB 215.33 KB 215.47 KB UMD_DEV
react-dom.production.min.js 0.0% -0.0% 119.63 KB 119.65 KB 38.43 KB 38.43 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 123.31 KB 123.33 KB 39.47 KB 39.48 KB UMD_PROFILING
react-dom.development.js 0.0% +0.1% 946.81 KB 947.28 KB 213.75 KB 213.89 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-unstable-flight-server.node.development.js 0.0% +0.1% 10.03 KB 10.03 KB 3.27 KB 3.27 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 119.8 KB 119.82 KB 37.76 KB 37.76 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-unstable-flight-server.node.production.min.js 0.0% 🔺+0.2% 2.81 KB 2.81 KB 1.28 KB 1.29 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-unstable-flight-server.browser.development.js 0.0% 0.0% 9.13 KB 9.13 KB 3.01 KB 3.02 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
react-dom-unstable-flight-server.browser.production.min.js 0.0% 🔺+0.2% 2.65 KB 2.65 KB 1.26 KB 1.26 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.14 KB 60.14 KB 15.79 KB 15.8 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.73 KB 10.73 KB 3.67 KB 3.67 KB UMD_PROD
ReactDOM-dev.js 0.0% +0.1% 974.91 KB 975.38 KB 216.28 KB 216.44 KB FB_WWW_DEV
ReactDOM-prod.js -0.0% 0.0% 402.59 KB 402.55 KB 73.14 KB 73.14 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
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 4.42 KB 4.42 KB 1.65 KB 1.65 KB NODE_DEV
ReactDOM-profiling.js 0.0% 0.0% 403.42 KB 403.47 KB 73.7 KB 73.71 KB FB_WWW_PROFILING
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.48 KB 10.48 KB 3.57 KB 3.58 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.1% 1.21 KB 1.21 KB 696 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.1% 617.11 KB 617.57 KB 128.18 KB 128.34 KB FB_WWW_DEV
ReactART-prod.js 0.0% 0.0% 236.23 KB 236.28 KB 39.69 KB 39.7 KB FB_WWW_PROD
react-art.development.js +0.1% +0.1% 672.99 KB 673.46 KB 145.91 KB 146.04 KB UMD_DEV
react-art.production.min.js 0.0% 0.0% 106.73 KB 106.75 KB 32.35 KB 32.36 KB UMD_PROD
react-art.development.js +0.1% +0.1% 603.66 KB 604.13 KB 128.53 KB 128.66 KB NODE_DEV
react-art.production.min.js 0.0% 0.0% 71.73 KB 71.75 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.1% 602.14 KB 602.61 KB 126.61 KB 126.74 KB NODE_DEV
react-reconciler-reflection.development.js 0.0% 0.0% 19.09 KB 19.09 KB 6.23 KB 6.23 KB NODE_DEV
react-reconciler-persistent.production.min.js 0.0% 0.0% 72.49 KB 72.51 KB 21.33 KB 21.34 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% 🔺+0.2% 2.86 KB 2.86 KB 1.24 KB 1.24 KB NODE_PROD
react-reconciler.development.js +0.1% +0.1% 604.67 KB 605.14 KB 127.7 KB 127.83 KB NODE_DEV
react-reconciler.production.min.js 0.0% 0.0% 74.76 KB 74.78 KB 21.89 KB 21.89 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against c386a55

@gaearon
Copy link
Collaborator

gaearon commented Nov 12, 2019

Do we know when this regressed?

@acdlite
Copy link
Collaborator Author

acdlite commented Nov 12, 2019

Not sure, I'll have to check. I'm going to cut a minor regardless, so I'll do that first. If enough people complain we can consider cutting some patches, too.

@acdlite acdlite merged commit b53ea6c into facebook:master Nov 12, 2019
@gaearon
Copy link
Collaborator

gaearon commented Nov 13, 2019

Can we close #17066 now? Can you verify its repro works now?

@acdlite
Copy link
Collaborator Author

acdlite commented Nov 14, 2019

Verified with https://codesandbox.io/s/react-typescript-2thgm

newkdr added a commit to newkdr/vscode-gitlens that referenced this pull request Dec 12, 2024
![snyk-top-banner](https://redirect.github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)


<h3>Snyk has created this PR to upgrade react-dom from 16.8.4 to
16.14.0.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.

<hr/>


- The recommended version is **13 versions** ahead of your current
version.

- The recommended version was released on **4 years ago**.



<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>react-dom</b></summary>
    <ul>
      <li>
<b>16.14.0</b> - <a
href="https://redirect.github.com/facebook/react/releases/tag/v16.14.0">2020-10-14</a></br><h3>React</h3>
<ul>
<li>Add support for the <a
href="https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html"
rel="nofollow">new JSX transform</a>. (<a
href="https://redirect.github.com/lunaruan">@ lunaruan</a> in <a
href="https://redirect.github.com/facebook/react/pull/18299"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/18299/hovercard">#18299</a>)</li>
</ul>
      </li>
      <li>
<b>16.13.1</b> - <a
href="https://redirect.github.com/facebook/react/releases/tag/v16.13.1">2020-03-19</a></br><h3>React
DOM</h3>
<ul>
<li>Fix bug in legacy mode Suspense where effect clean-up functions are
not fired. This only affects users who use Suspense for data fetching in
legacy mode, which is not technically supported. (<a
href="https://redirect.github.com/acdlite">@ acdlite</a> in <a
href="https://redirect.github.com/facebook/react/pull/18238"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/18238/hovercard">#18238</a>)</li>
<li>Revert warning for cross-component updates that happen inside class
render lifecycles (<code>componentWillReceiveProps</code>,
<code>shouldComponentUpdate</code>, and so on). (<a
href="https://redirect.github.com/gaearon">@ gaearon</a> in <a
href="https://redirect.github.com/facebook/react/pull/18330"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/18330/hovercard">#18330</a>)</li>
</ul>
<h2>Artifacts</h2>
<ul>
<li>react: <a href="https://unpkg.com/react@16.13.1/umd/"
rel="nofollow">https://unpkg.com/react@16.13.1/umd/</a></li>
<li>react-art: <a href="https://unpkg.com/react-art@16.13.1/umd/"
rel="nofollow">https://unpkg.com/react-art@16.13.1/umd/</a></li>
<li>react-dom: <a href="https://unpkg.com/react-dom@16.13.1/umd/"
rel="nofollow">https://unpkg.com/react-dom@16.13.1/umd/</a></li>
<li>react-is: <a href="https://unpkg.com/react-is@16.13.1/umd/"
rel="nofollow">https://unpkg.com/react-is@16.13.1/umd/</a></li>
<li>react-test-renderer: <a
href="https://unpkg.com/react-test-renderer@16.13.1/umd/"
rel="nofollow">https://unpkg.com/react-test-renderer@16.13.1/umd/</a></li>
<li>scheduler: <a href="https://unpkg.com/scheduler@0.19.1/umd/"
rel="nofollow">https://unpkg.com/scheduler@0.19.1/umd/</a></li>
</ul>
      </li>
      <li>
<b>16.13.0</b> - <a
href="https://redirect.github.com/facebook/react/releases/tag/v16.13.0">2020-02-26</a></br><h3>React</h3>
<ul>
<li>Warn when a string ref is used in a manner that's not amenable to a
future codemod (<a href="https://redirect.github.com/lunaruan">@
lunaruan</a> in <a
href="https://redirect.github.com/facebook/react/pull/17864"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17864/hovercard">#17864</a>)</li>
<li>Deprecate <code>React.createFactory()</code> (<a
href="https://redirect.github.com/trueadm">@ trueadm</a> in <a
href="https://redirect.github.com/facebook/react/pull/17878"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17878/hovercard">#17878</a>)</li>
</ul>
<h3>React DOM</h3>
<ul>
<li>Warn when changes in <code>style</code> may cause an unexpected
collision (<a href="https://redirect.github.com/sophiebits">@
sophiebits</a> in <a
href="https://redirect.github.com/facebook/react/pull/14181"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/14181/hovercard">#14181</a>, <a
href="https://redirect.github.com/facebook/react/pull/18002"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/18002/hovercard">#18002</a>)</li>
<li>Warn when a function component is updated during another component's
render phase (<a class="user-mention notranslate"
data-hovercard-type="user" data-hovercard-url="/users/acdlite/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/acdlite">@ acdlite</a> in <a
href="https://redirect.github.com/facebook/react/pull/17099"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17099/hovercard">#17099</a>)</li>
<li>Deprecate <code>unstable_createPortal</code> (<a
href="https://redirect.github.com/trueadm">@ trueadm</a> in <a
href="https://redirect.github.com/facebook/react/pull/17880"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17880/hovercard">#17880</a>)</li>
<li>Fix <code>onMouseEnter</code> being fired on disabled buttons (<a
href="https://redirect.github.com/AlfredoGJ">@ AlfredoGJ</a> in <a
href="https://redirect.github.com/facebook/react/pull/17675"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17675/hovercard">#17675</a>)</li>
<li>Call <code>shouldComponentUpdate</code> twice when developing in
<code>StrictMode</code> (<a href="https://redirect.github.com/bvaughn">@
bvaughn</a> in <a
href="https://redirect.github.com/facebook/react/pull/17942"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17942/hovercard">#17942</a>)</li>
<li>Add <code>version</code> property to ReactDOM (<a
href="https://redirect.github.com/ealush">@ ealush</a> in <a
href="https://redirect.github.com/facebook/react/pull/15780"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/15780/hovercard">#15780</a>)</li>
<li>Don't call <code>toString()</code> of
<code>dangerouslySetInnerHTML</code> (<a
href="https://redirect.github.com/sebmarkbage">@ sebmarkbage</a> in <a
href="https://redirect.github.com/facebook/react/pull/17773"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17773/hovercard">#17773</a>)</li>
<li>Show component stacks in more warnings (<a
href="https://redirect.github.com/gaearon">@ gaearon</a> in <a
href="https://redirect.github.com/facebook/react/pull/17922"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17922/hovercard">#17922</a>, <a
href="https://redirect.github.com/facebook/react/pull/17586"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17586/hovercard">#17586</a>)</li>
</ul>
<h3>Concurrent Mode (Experimental)</h3>
<ul>
<li>Warn for problematic usages of <code>ReactDOM.createRoot()</code>
(<a href="https://redirect.github.com/trueadm">@ trueadm</a> in <a
href="https://redirect.github.com/facebook/react/pull/17937"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17937/hovercard">#17937</a>)</li>
<li>Remove <code>ReactDOM.createRoot()</code> callback params and added
warnings on usage (<a href="https://redirect.github.com/bvaughn">@
bvaughn</a> in <a
href="https://redirect.github.com/facebook/react/pull/17916"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17916/hovercard">#17916</a>)</li>
<li>Don't group Idle/Offscreen work with other work (<a
href="https://redirect.github.com/sebmarkbage">@ sebmarkbage</a> in <a
href="https://redirect.github.com/facebook/react/pull/17456"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17456/hovercard">#17456</a>)</li>
<li>Adjust <code>SuspenseList</code> CPU bound heuristic (<a
href="https://redirect.github.com/sebmarkbage">@ sebmarkbage</a> in <a
href="https://redirect.github.com/facebook/react/pull/17455"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17455/hovercard">#17455</a>)</li>
<li>Add missing event plugin priorities (<a
href="https://redirect.github.com/trueadm">@ trueadm</a> in <a
href="https://redirect.github.com/facebook/react/pull/17914"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17914/hovercard">#17914</a>)</li>
<li>Fix <code>isPending</code> only being true when transitioning from
inside an input event (<a href="https://redirect.github.com/acdlite">@
acdlite</a> in <a
href="https://redirect.github.com/facebook/react/pull/17382"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17382/hovercard">#17382</a>)</li>
<li>Fix <code>React.memo</code> components dropping updates when
interrupted by a higher priority update (<a class="user-mention
notranslate" data-hovercard-type="user"
data-hovercard-url="/users/acdlite/hovercard"
data-octo-click="hovercard-link-click"
data-octo-dimensions="link_type:self"
href="https://redirect.github.com/acdlite">@ acdlite</a> in <a
href="https://redirect.github.com/facebook/react/pull/18091"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/18091/hovercard">#18091</a>)</li>
<li>Don't warn when suspending at the wrong priority (<a
href="https://redirect.github.com/gaearon">@ gaearon</a> in <a
href="https://redirect.github.com/facebook/react/pull/17971"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17971/hovercard">#17971</a>)</li>
<li>Fix a bug with rebasing updates (<a
href="https://redirect.github.com/acdlite">@ acdlite</a> and <a
href="https://redirect.github.com/sebmarkbage">@ sebmarkbage</a> in <a
href="https://redirect.github.com/facebook/react/pull/17560"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17560/hovercard">#17560</a>, <a
href="https://redirect.github.com/facebook/react/pull/17510"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17510/hovercard">#17510</a>, <a
href="https://redirect.github.com/facebook/react/pull/17483"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17483/hovercard">#17483</a>, <a
href="https://redirect.github.com/facebook/react/pull/17480"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17480/hovercard">#17480</a>)</li>
</ul>
<h2>Artifacts</h2>
<ul>
<li>react: <a href="https://unpkg.com/react@16.13.0/umd/"
rel="nofollow">https://unpkg.com/react@16.13.0/umd/</a></li>
<li>react-art: <a href="https://unpkg.com/react-art@16.13.0/umd/"
rel="nofollow">https://unpkg.com/react-art@16.13.0/umd/</a></li>
<li>react-dom: <a href="https://unpkg.com/react-dom@16.13.0/umd/"
rel="nofollow">https://unpkg.com/react-dom@16.13.0/umd/</a></li>
<li>react-is: <a href="https://unpkg.com/react-is@16.13.0/umd/"
rel="nofollow">https://unpkg.com/react-is@16.13.0/umd/</a></li>
<li>react-test-renderer: <a
href="https://unpkg.com/react-test-renderer@16.13.0/umd/"
rel="nofollow">https://unpkg.com/react-test-renderer@16.13.0/umd/</a></li>
<li>scheduler: <a href="https://unpkg.com/scheduler@0.19.0/umd/"
rel="nofollow">https://unpkg.com/scheduler@0.19.0/umd/</a></li>
</ul>
      </li>
      <li>
<b>16.12.0</b> - <a
href="https://redirect.github.com/facebook/react/releases/tag/v16.12.0">2019-11-14</a></br><h3>React
DOM</h3>
<ul>
<li>Fix passive effects (<code>useEffect</code>) not being fired in a
multi-root app. (<a href="https://redirect.github.com/acdlite">@
acdlite</a> in <a
href="https://redirect.github.com/facebook/react/pull/17347"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17347/hovercard">#17347</a>)</li>
</ul>
<h3>React Is</h3>
<ul>
<li>Fix <code>lazy</code> and <code>memo</code> types considered
elements instead of components (<a
href="https://redirect.github.com/bvaughn">@ bvaughn</a> in <a
href="https://redirect.github.com/facebook/react/pull/17278"
data-hovercard-type="pull_request"
data-hovercard-url="/facebook/react/pull/17278/hovercard">#17278</a>)</li>
</ul>
<h2>Artifacts</h2>
<p>• react: <a href="https://unpkg.com/react@16.12.0/umd/"
rel="nofollow">https://unpkg.com/react@16.12.0/umd/</a><br>
• react-art: <a href="https://unpkg.com/react-art@16.12.0/umd/"
rel="nofollow">https://unpkg.com/react-art@16.12.0/umd/</a><br>
• react-dom: <a href="https://unpkg.com/react-dom@16.12.0/umd/"
rel="nofollow">https://unpkg.com/react-dom@16.12.0/umd/</a><br>
• react-is: <a href="https://unpkg.com/react-is@16.12.0/umd/"
rel="nofollow">https://unpkg.com/react-is@16.12.0/umd/</a><br>
• react-test-renderer: <a
href="https://unpkg.com/react-test-renderer@16.12.0/umd/"
rel="nofollow">https://unpkg.com/react-test-renderer@16.12.0/umd/</a><br>
• scheduler: <a href="https://unpkg.com/scheduler@0.18.0/umd/"
rel="nofollow">https://unpkg.com/scheduler@0.18.0/umd/</a></p>
      </li>
      <li>
        <b>16.11.0</b> - 2019-10-22
      </li>
      <li>
        <b>16.10.2</b> - 2019-10-03
      </li>
      <li>
        <b>16.10.1</b> - 2019-09-28
      </li>
      <li>
        <b>16.10.0</b> - 2019-09-27
      </li>
      <li>
        <b>16.9.0</b> - 2019-08-08
      </li>
      <li>
        <b>16.9.0-rc.0</b> - 2019-08-05
      </li>
      <li>
        <b>16.9.0-alpha.0</b> - 2019-04-03
      </li>
      <li>
        <b>16.8.6</b> - 2019-03-28
      </li>
      <li>
        <b>16.8.5</b> - 2019-03-22
      </li>
      <li>
        <b>16.8.4</b> - 2019-03-05
      </li>
    </ul>
from <a
href="https://redirect.github.com/facebook/react/releases">react-dom
GitHub release notes</a>
  </details>
</details>

---

> [!IMPORTANT]
>
> - Check the changes in this PR to ensure they won't cause issues with
your project.
> - This PR was automatically created by Snyk using the credentials of a
real user.

---

**Note:** _You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs._

**For more information:** <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI4NTdmYmVkYy1hZTE3LTQ3ZGYtODhkYy03MTcyMWYxNThjZTkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6Ijg1N2ZiZWRjLWFlMTctNDdkZi04OGRjLTcxNzIxZjE1OGNlOSJ9fQ=="
width="0" height="0"/>

> - 🧐 [View latest project
report](https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 📜 [Customise PR
templates](https://docs.snyk.io/scan-using-snyk/pull-requests/snyk-fix-pull-or-merge-requests/customize-pr-templates)
> - 🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)
> - 🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17/settings/integration?pkg&#x3D;react-dom&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

[//]: #
'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"react-dom","from":"16.8.4","to":"16.14.0"}],"env":"prod","hasFixes":false,"isBreakingChange":false,"isMajorUpgrade":false,"issuesToFix":[],"prId":"857fbedc-ae17-47df-88dc-71721f158ce9","prPublicId":"857fbedc-ae17-47df-88dc-71721f158ce9","packageManager":"npm","priorityScoreList":[],"projectPublicId":"12a8a5f5-3e19-438c-8280-eb8f4ee06d17","projectUrl":"https://app.snyk.io/org/newkdr/project/12a8a5f5-3e19-438c-8280-eb8f4ee06d17?utm_source=github&utm_medium=referral&page=upgrade-pr","prType":"upgrade","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":[],"type":"auto","upgrade":[],"upgradeInfo":{"versionsDiff":13,"publishedDate":"2020-10-14T19:38:26.085Z"},"vulns":[]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants