Skip to content

Warn for update on different component in render - #17099

Merged
acdlite merged 1 commit into
react:masterfrom
acdlite:render-phase-warning
Feb 19, 2020
Merged

Warn for update on different component in render#17099
acdlite merged 1 commit into
react:masterfrom
acdlite:render-phase-warning

Conversation

@acdlite

Copy link
Copy Markdown
Collaborator

This warning already exists for class components, but not for functions.

It does not apply to render phase updates to the same component, which have special semantics that we do support.

@sizebot

sizebot commented Oct 15, 2019

Copy link
Copy Markdown

ReactDOM: size: 0.0%, gzip: -0.0%

Details of bundled changes.

Comparing: a8c6a1b...bd8fbdb

react-art

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-art.development.js+0.1%0.0%668.18 KB668.56 KB145.35 KB145.4 KBUMD_DEV
react-art.production.min.js0.0%-0.0%103.67 KB103.67 KB31.51 KB31.51 KBUMD_PROD
react-art.development.js+0.1%0.0%598.81 KB599.19 KB127.95 KB128 KBNODE_DEV
react-art.production.min.js0.0%-0.0%68.69 KB68.69 KB20.8 KB20.8 KBNODE_PROD
ReactART-dev.js+0.1%+0.1%611.99 KB612.37 KB127.55 KB127.62 KBFB_WWW_DEV
ReactART-prod.js0.0%0.0%232.34 KB232.34 KB39.18 KB39.18 KBFB_WWW_PROD

react-dom

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-dom.profiling.min.js0.0%-0.0%119.46 KB119.46 KB37.7 KB37.69 KBNODE_PROFILING
react-dom-server.browser.development.js0.0%-0.0%140.06 KB140.06 KB36.8 KB36.8 KBUMD_DEV
ReactDOM-dev.js0.0%0.0%968.76 KB969.15 KB215.37 KB215.44 KBFB_WWW_DEV
react-dom-server.browser.production.min.js0.0%-0.0%19.84 KB19.84 KB7.37 KB7.37 KBUMD_PROD
react-dom-test-utils.development.js0.0%-0.0%56.31 KB56.31 KB15.59 KB15.59 KBUMD_DEV
react-dom-unstable-fizz.browser.development.js0.0%-0.1%3.78 KB3.78 KB1.53 KB1.53 KBUMD_DEV
react-dom-unstable-fizz.browser.production.min.js0.0%-0.3%1.2 KB1.2 KB701 B699 BUMD_PROD
react-dom-test-utils.development.js0.0%-0.0%54.58 KB54.58 KB15.25 KB15.25 KBNODE_DEV
react-dom-unstable-fizz.browser.development.js0.0%-0.2%3.61 KB3.61 KB1.48 KB1.48 KBNODE_DEV
react-dom-test-utils.production.min.js0.0%0.0%10.94 KB10.94 KB4.08 KB4.08 KBNODE_PROD
react-dom-unstable-fizz.browser.production.min.js0.0%-0.3%1.04 KB1.04 KB632 B630 BNODE_PROD
react-dom.development.js0.0%0.0%946.8 KB947.18 KB214.52 KB214.56 KBUMD_DEV
react-dom.production.min.js0.0%-0.0%115.7 KB115.7 KB37.25 KB37.25 KBUMD_PROD
react-dom.profiling.min.js0.0%-0.0%119.22 KB119.22 KB38.33 KB38.33 KBUMD_PROFILING
react-dom.development.js0.0%0.0%940.87 KB941.25 KB212.95 KB213 KBNODE_DEV
react-dom-server.node.development.js0.0%-0.0%137.1 KB137.1 KB36.02 KB36.02 KBNODE_DEV
react-dom.production.min.js0.0%-0.0%115.81 KB115.81 KB36.69 KB36.68 KBNODE_PROD
react-dom-server.node.production.min.js0.0%-0.0%20.17 KB20.17 KB7.5 KB7.5 KBNODE_PROD
ReactDOM-profiling.js0.0%0.0%398.87 KB398.87 KB72.99 KB72.99 KBFB_WWW_PROFILING
react-dom-server.browser.development.js0.0%-0.0%135.99 KB135.99 KB35.8 KB35.8 KBNODE_DEV
react-dom-server.browser.production.min.js0.0%-0.0%19.76 KB19.76 KB7.35 KB7.35 KBNODE_PROD
react-dom-unstable-native-dependencies.development.js0.0%-0.0%60.13 KB60.13 KB15.79 KB15.79 KBUMD_DEV
react-dom-unstable-native-dependencies.production.min.js0.0%-0.0%10.72 KB10.72 KB3.67 KB3.66 KBUMD_PROD
ReactDOMServer-dev.js0.0%-0.0%139.29 KB139.29 KB35.33 KB35.32 KBFB_WWW_DEV
ReactDOMServer-prod.js0.0%0.0%48.5 KB48.5 KB11.08 KB11.08 KBFB_WWW_PROD
react-dom-unstable-native-dependencies.development.js0.0%-0.0%59.8 KB59.8 KB15.66 KB15.65 KBNODE_DEV
react-dom-unstable-fizz.node.development.js0.0%-0.1%3.87 KB3.87 KB1.51 KB1.51 KBNODE_DEV
react-dom-unstable-native-dependencies.production.min.js0.0%-0.1%10.46 KB10.46 KB3.57 KB3.56 KBNODE_PROD
react-dom-unstable-fizz.node.production.min.js0.0%-0.2%1.1 KB1.1 KB666 B665 BNODE_PROD

react-test-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactTestRenderer-dev.js+0.1%+0.1%623.53 KB623.91 KB130.09 KB130.16 KBFB_WWW_DEV
react-test-renderer-shallow.development.js0.0%-0.0%38.56 KB38.56 KB9.9 KB9.9 KBUMD_DEV
react-test-renderer-shallow.production.min.js0.0%-0.1%11.43 KB11.43 KB3.54 KB3.54 KBUMD_PROD
react-test-renderer-shallow.development.js0.0%-0.0%32.53 KB32.53 KB8.42 KB8.42 KBNODE_DEV
react-test-renderer-shallow.production.min.js0.0%-0.1%11.57 KB11.57 KB3.63 KB3.63 KBNODE_PROD
react-test-renderer.development.js+0.1%0.0%612.88 KB613.26 KB130.96 KB131 KBUMD_DEV
react-test-renderer.production.min.js0.0%-0.0%70.71 KB70.71 KB21.64 KB21.64 KBUMD_PROD
react-test-renderer.development.js+0.1%0.0%608.15 KB608.53 KB129.77 KB129.81 KBNODE_DEV
react-test-renderer.production.min.js0.0%-0.0%70.41 KB70.41 KB21.32 KB21.31 KBNODE_PROD

react-reconciler

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-reconciler.development.js+0.1%0.0%599.79 KB600.17 KB127.12 KB127.17 KBNODE_DEV
react-reconciler.production.min.js0.0%-0.0%71.41 KB71.41 KB21.1 KB21.1 KBNODE_PROD
react-reconciler-reflection.development.js0.0%-0.0%19.19 KB19.19 KB6.26 KB6.26 KBNODE_DEV
react-reconciler-reflection.production.min.js0.0%-0.2%2.85 KB2.85 KB1.24 KB1.23 KBNODE_PROD
react-reconciler-persistent.development.js+0.1%0.0%597.14 KB597.52 KB125.99 KB126.04 KBNODE_DEV
react-reconciler-persistent.production.min.js0.0%-0.0%71.42 KB71.42 KB21.11 KB21.11 KBNODE_PROD

react-native-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactNativeRenderer-prod.js0.0%-0.0%272.58 KB272.58 KB46.75 KB46.74 KBRN_OSS_PROD
ReactFabric-prod.js0.0%-0.0%264.34 KB264.34 KB45.36 KB45.36 KBRN_OSS_PROD
ReactFabric-profiling.js0.0%-0.0%275.17 KB275.17 KB47.27 KB47.27 KBRN_OSS_PROFILING
ReactFabric-dev.js+0.1%0.0%747.38 KB747.76 KB158.43 KB158.5 KBRN_FB_DEV
ReactNativeRenderer-dev.js+0.1%0.0%741.72 KB742.1 KB157.51 KB157.58 KBRN_OSS_DEV
ReactFabric-profiling.js0.0%-0.0%275.17 KB275.17 KB47.29 KB47.28 KBRN_FB_PROFILING
ReactNativeRenderer-dev.js+0.1%0.0%741.88 KB742.26 KB157.6 KB157.67 KBRN_FB_DEV
ReactNativeRenderer-prod.js0.0%-0.0%272.57 KB272.57 KB46.76 KB46.76 KBRN_FB_PROD
ReactNativeRenderer-profiling.js0.0%0.0%282.31 KB282.31 KB48.54 KB48.54 KBRN_FB_PROFILING
ReactFabric-dev.js+0.1%0.0%747.21 KB747.59 KB158.36 KB158.43 KBRN_OSS_DEV

Generated by 🚫 dangerJS against bd8fbdb

@acdlite
acdliteforce-pushed the render-phase-warning branch from 6b0ffdf to bd8fbdbCompareOctober 15, 2019 21:54
'Cannot update during an existing state transition (such as ' +
'within `render`). Render methods should be a pure function of ' +
'props and state.',
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why use warningWithoutStack instead of warning here?

expect(ReactNoop.getChildren()).toEqual([span(22)]);
});

it('warns about render phase update on a different component', async () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I presume there's already a test for it not warning if it's the same component?

@acdlite

Copy link
Copy Markdown
CollaboratorAuthor

@sebmarkbage@gaearon Do we want to land this warning? If so I'll update it

@gaearon

Copy link
Copy Markdown
Collaborator

@ermanzohre Can I ask you to please not “approve” old pull requests? Your actions are creating notification noise for everyone watching the repo. Thanks.

This warning already exists for class components, but not for functions.
It does not apply to render phase updates to the same component, which
have special semantics that we do support.
@acdlite
acdliteforce-pushed the render-phase-warning branch from bd8fbdb to 1051db9CompareFebruary 19, 2020 19:45
@codesandbox-ci

Copy link
Copy Markdown

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.

@sizebot

Copy link
Copy Markdown
Details of bundled changes.

Comparing: 085d021...1051db9

react-dom

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-dom.profiling.min.js0.0%-0.0%123.81 KB123.81 KB38.73 KB38.73 KBNODE_PROFILING
react-dom-unstable-fizz.browser.development.js0.0%-0.1%3.88 KB3.88 KB1.55 KB1.55 KBUMD_DEV
ReactDOM-dev.js0.0%0.0%990.26 KB990.7 KB218.29 KB218.38 KBFB_WWW_DEV
react-dom-testing.profiling.min.js0.0%-0.0%121.36 KB121.36 KB38.26 KB38.26 KBNODE_PROFILING
react-dom-test-utils.production.min.js0.0%-0.0%11.23 KB11.23 KB4.17 KB4.17 KBUMD_PROD
react-dom-server.browser.production.min.js0.0%-0.0%20.46 KB20.46 KB7.5 KB7.5 KBUMD_PROD
react-dom-server.browser.development.js0.0%-0.0%135.71 KB135.71 KB36.09 KB36.09 KBNODE_DEV
react-dom-test-utils.production.min.js0.0%-0.0%11 KB11 KB4.11 KB4.11 KBNODE_PROD
react-dom.development.js0.0%0.0%969.98 KB970.41 KB217.9 KB217.97 KBUMD_DEV
react-dom-unstable-native-dependencies.development.js0.0%-0.0%58.73 KB58.73 KB15.36 KB15.36 KBUMD_DEV
react-dom.production.min.js0.0%-0.0%119.96 KB119.96 KB38.34 KB38.34 KBUMD_PROD
react-dom.profiling.min.js0.0%-0.0%123.59 KB123.59 KB39.52 KB39.52 KBUMD_PROFILING
react-dom.development.js0.0%0.0%964.06 KB964.49 KB216.27 KB216.34 KBNODE_DEV
react-dom-unstable-native-dependencies.development.js0.0%-0.0%58.43 KB58.43 KB15.28 KB15.28 KBNODE_DEV
react-dom-unstable-fizz.node.development.js0.0%-0.1%4.42 KB4.42 KB1.65 KB1.65 KBNODE_DEV
react-dom.production.min.js0.0%-0.0%120.02 KB120.02 KB37.58 KB37.58 KBNODE_PROD
react-dom-unstable-fizz.node.production.min.js0.0%-0.1%1.21 KB1.21 KB698 B697 BNODE_PROD
react-dom-unstable-fizz.browser.production.min.js0.0%-0.2%1.05 KB1.05 KB642 B641 BNODE_PROD
react-dom-testing.development.js0.0%0.0%966.82 KB967.25 KB216.74 KB216.81 KBUMD_DEV
react-dom-testing.production.min.js0.0%-0.0%117.6 KB117.6 KB37.89 KB37.88 KBUMD_PROD
ReactDOMTesting-dev.js0.0%0.0%989.77 KB990.2 KB218.16 KB218.26 KBFB_WWW_DEV
ReactDOMTesting-prod.js0.0%0.0%371.5 KB371.5 KB67.65 KB67.65 KBFB_WWW_PROD
react-dom-testing.development.js0.0%0.0%960.9 KB961.33 KB215.11 KB215.18 KBNODE_DEV
ReactDOMTesting-profiling.js0.0%0.0%371.5 KB371.5 KB67.65 KB67.65 KBFB_WWW_PROFILING
react-dom-server.node.development.js0.0%-0.0%136.82 KB136.82 KB36.32 KB36.32 KBNODE_DEV
react-dom-server.node.production.min.js0.0%0.0%20.79 KB20.79 KB7.62 KB7.62 KBNODE_PROD

react-art

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactART-dev.js+0.1%+0.1%625.45 KB625.88 KB129.19 KB129.29 KBFB_WWW_DEV
react-art.development.js+0.1%0.0%682.43 KB682.86 KB146.87 KB146.94 KBUMD_DEV
react-art.production.min.js0.0%-0.0%107.54 KB107.54 KB32.53 KB32.52 KBUMD_PROD
react-art.development.js+0.1%+0.1%613.1 KB613.53 KB129.46 KB129.53 KBNODE_DEV

react-test-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-test-renderer.development.js+0.1%+0.1%626.21 KB626.65 KB132.06 KB132.13 KBUMD_DEV
react-test-renderer.production.min.js0.0%-0.0%72.16 KB72.16 KB21.96 KB21.96 KBUMD_PROD
react-test-renderer.development.js+0.1%+0.1%621.48 KB621.91 KB130.87 KB130.94 KBNODE_DEV
react-test-renderer.production.min.js0.0%-0.0%71.93 KB71.93 KB21.63 KB21.63 KBNODE_PROD
ReactTestRenderer-dev.js+0.1%+0.1%636.94 KB637.38 KB131.69 KB131.78 KBFB_WWW_DEV
react-test-renderer-shallow.development.js0.0%-0.0%37.89 KB37.89 KB9.84 KB9.84 KBUMD_DEV
react-test-renderer-shallow.production.min.js0.0%-0.0%11.66 KB11.66 KB3.6 KB3.6 KBUMD_PROD
react-test-renderer-shallow.development.js0.0%-0.0%32.43 KB32.43 KB8.53 KB8.53 KBNODE_DEV
react-test-renderer-shallow.production.min.js0.0%-0.0%11.79 KB11.79 KB3.71 KB3.71 KBNODE_PROD

react-native-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactFabric-dev.js+0.1%+0.1%721.47 KB721.91 KB152.51 KB152.6 KBRN_FB_DEV
ReactNativeRenderer-dev.js+0.1%+0.1%730.78 KB731.21 KB154.56 KB154.66 KBRN_OSS_DEV
ReactNativeRenderer-prod.js0.0%-0.0%267.71 KB267.71 KB46.25 KB46.25 KBRN_OSS_PROD
ReactNativeRenderer-dev.js+0.1%+0.1%730.95 KB731.38 KB154.65 KB154.74 KBRN_FB_DEV
ReactFabric-dev.js+0.1%+0.1%721.29 KB721.72 KB152.42 KB152.52 KBRN_OSS_DEV

react-reconciler

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-reconciler-persistent.development.js+0.1%+0.1%615.41 KB615.84 KB128.53 KB128.6 KBNODE_DEV
react-reconciler-reflection.development.js0.0%-0.0%20.54 KB20.54 KB6.76 KB6.76 KBNODE_DEV
react-reconciler-persistent.production.min.js0.0%-0.0%73.76 KB73.76 KB21.79 KB21.79 KBNODE_PROD
react-reconciler-reflection.production.min.js0.0%-0.1%2.86 KB2.86 KB1.24 KB1.24 KBNODE_PROD
react-reconciler.development.js+0.1%+0.1%619.22 KB619.65 KB130.04 KB130.11 KBNODE_DEV

Size changes (experimental)

Generated by 🚫 dangerJS against 1051db9

@sizebot

Copy link
Copy Markdown
Details of bundled changes.

Comparing: 085d021...1051db9

react-dom

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-dom-testing.production.min.js0.0%-0.0%117.15 KB117.15 KB37.05 KB37.05 KBNODE_PROD
react-dom-unstable-native-dependencies.development.js0.0%-0.0%58.72 KB58.72 KB15.35 KB15.35 KBUMD_DEV
react-dom-testing.profiling.min.js0.0%-0.0%120.83 KB120.83 KB38.13 KB38.13 KBNODE_PROFILING
react-dom.development.js0.0%0.0%969.96 KB970.39 KB217.89 KB217.96 KBUMD_DEV
react-dom-unstable-fizz.node.production.min.js0.0%-0.1%1.2 KB1.2 KB690 B689 BNODE_PROD
react-dom.production.min.js0.0%0.0%116.04 KB116.04 KB37.24 KB37.24 KBUMD_PROD
react-dom-server.browser.production.min.js0.0%-0.0%20 KB20 KB7.4 KB7.4 KBUMD_PROD
ReactDOMTesting-dev.js0.0%0.0%989.76 KB990.19 KB218.15 KB218.25 KBFB_WWW_DEV
react-dom.development.js0.0%0.0%964.04 KB964.47 KB216.25 KB216.32 KBNODE_DEV
react-dom-server.browser.development.js0.0%-0.0%135.68 KB135.68 KB36.09 KB36.09 KBNODE_DEV
react-dom.production.min.js0.0%-0.0%116.08 KB116.08 KB36.56 KB36.56 KBNODE_PROD
react-dom-testing.development.js0.0%0.0%966.79 KB967.22 KB216.73 KB216.8 KBUMD_DEV
react-dom-server.browser.production.min.js0.0%-0.0%19.93 KB19.93 KB7.39 KB7.39 KBNODE_PROD
react-dom.profiling.min.js0.0%-0.0%119.75 KB119.75 KB37.66 KB37.66 KBNODE_PROFILING
react-dom-testing.production.min.js0.0%-0.0%117.07 KB117.07 KB37.72 KB37.72 KBUMD_PROD
ReactDOM-dev.js0.0%0.0%991.21 KB991.64 KB218.6 KB218.69 KBFB_WWW_DEV
ReactDOMServer-dev.js0.0%-0.0%140.46 KB140.46 KB35.55 KB35.55 KBFB_WWW_DEV
ReactDOM-prod.js0.0%-0.0%397.23 KB397.23 KB72.18 KB72.18 KBFB_WWW_PROD
react-dom-testing.development.js0.0%0.0%960.87 KB961.31 KB215.09 KB215.16 KBNODE_DEV
react-dom-unstable-native-dependencies.development.js0.0%-0.0%58.42 KB58.42 KB15.28 KB15.28 KBNODE_DEV
react-dom-test-utils.development.js0.0%-0.0%55.98 KB55.98 KB15.78 KB15.78 KBUMD_DEV
react-dom-test-utils.production.min.js0.0%-0.0%11.21 KB11.21 KB4.16 KB4.16 KBUMD_PROD
react-dom-test-utils.development.js0.0%-0.0%54.25 KB54.25 KB15.47 KB15.46 KBNODE_DEV
react-dom-test-utils.production.min.js0.0%-0.0%10.99 KB10.99 KB4.1 KB4.1 KBNODE_PROD
react-dom-server.node.production.min.js0.0%-0.0%20.34 KB20.34 KB7.54 KB7.54 KBNODE_PROD

react-native-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
ReactFabric-dev.js+0.1%+0.1%721.28 KB721.71 KB152.42 KB152.51 KBRN_OSS_DEV
ReactNativeRenderer-dev.js+0.1%+0.1%730.76 KB731.2 KB154.56 KB154.65 KBRN_OSS_DEV

react-reconciler

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-reconciler-persistent.development.js+0.1%+0.1%615.4 KB615.83 KB128.53 KB128.59 KBNODE_DEV
react-reconciler-persistent.production.min.js0.0%-0.0%73.75 KB73.75 KB21.78 KB21.78 KBNODE_PROD
react-reconciler.development.js+0.1%+0.1%619.21 KB619.64 KB130.04 KB130.11 KBNODE_DEV
react-reconciler-reflection.production.min.js0.0%-0.1%2.85 KB2.85 KB1.24 KB1.24 KBNODE_PROD

react-art

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-art.development.js+0.1%0.0%682.4 KB682.83 KB146.87 KB146.94 KBUMD_DEV
react-art.production.min.js0.0%-0.0%104.98 KB104.98 KB31.84 KB31.84 KBUMD_PROD
react-art.development.js+0.1%+0.1%613.08 KB613.51 KB129.46 KB129.53 KBNODE_DEV
ReactART-dev.js+0.1%+0.1%625.44 KB625.87 KB129.18 KB129.28 KBFB_WWW_DEV

react-test-renderer

FileFilesize DiffGzip DiffPrev SizeCurrent SizePrev GzipCurrent GzipENV
react-test-renderer.production.min.js0.0%-0.0%71.91 KB71.91 KB21.61 KB21.61 KBNODE_PROD
react-test-renderer-shallow.development.js0.0%-0.0%32.42 KB32.42 KB8.52 KB8.52 KBNODE_DEV
react-test-renderer-shallow.production.min.js0.0%-0.0%11.78 KB11.78 KB3.7 KB3.7 KBNODE_PROD
react-test-renderer.development.js+0.1%+0.1%626.19 KB626.62 KB132.04 KB132.12 KBUMD_DEV
react-test-renderer.production.min.js0.0%-0.0%72.13 KB72.13 KB21.94 KB21.94 KBUMD_PROD
react-test-renderer.development.js+0.1%+0.1%621.45 KB621.89 KB130.86 KB130.93 KBNODE_DEV
ReactTestRenderer-dev.js+0.1%+0.1%636.93 KB637.36 KB131.68 KB131.78 KBFB_WWW_DEV

Size changes (stable)

Generated by 🚫 dangerJS against 1051db9

@acdlite
acdlite merged commit ea6ed3d into react:masterFeb 19, 2020
@dai-shidai-shi mentioned this pull request Feb 21, 2020
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess this should include Block too?

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="/react/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="/react/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="/react/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="/react/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="/react/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="/react/react/pull/14181/hovercard">#14181</a>, <a
href="https://redirect.github.com/facebook/react/pull/18002"
data-hovercard-type="pull_request"
data-hovercard-url="/react/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="/react/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="/react/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="/react/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="/react/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="/react/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="/react/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="/react/react/pull/17922/hovercard">#17922</a>, <a
href="https://redirect.github.com/facebook/react/pull/17586"
data-hovercard-type="pull_request"
data-hovercard-url="/react/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="/react/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="/react/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="/react/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="/react/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="/react/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="/react/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="/react/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="/react/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="/react/react/pull/17560/hovercard">#17560</a>, <a
href="https://redirect.github.com/facebook/react/pull/17510"
data-hovercard-type="pull_request"
data-hovercard-url="/react/react/pull/17510/hovercard">#17510</a>, <a
href="https://redirect.github.com/facebook/react/pull/17483"
data-hovercard-type="pull_request"
data-hovercard-url="/react/react/pull/17483/hovercard">#17483</a>, <a
href="https://redirect.github.com/facebook/react/pull/17480"
data-hovercard-type="pull_request"
data-hovercard-url="/react/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="/react/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="/react/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":[]}'
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
This warning already exists for class components, but not for functions.
It does not apply to render phase updates to the same component, which
have special semantics that we do support.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedReact Core TeamOpened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@acdlite@sizebot@gaearon@sebmarkbage@Jessidhia@trueadm@ermanzohre@necolas@facebook-github-bot