Skip to content

Conversation

jbrown215
Copy link
Contributor

Summary:

To prepare for automatic effect dependencies, some codebases may want to codemod
existing useEffect calls with no deps to include an explicit undefined second argument
in order to preserve the "run on every render" behavior. In sufficiently large codebases,
this may require a temporary enforcement period where all effects provide an explicit
dependencies argument.

Outside of migration, relying on a component to render can lead to real bugs,
especially when working with memoization.

Summary:

To prepare for automatic effect dependencies, some codebases may want to codemod
existing useEffect calls with no deps to include an explicit undefined second argument
in order to preserve the "run on every render" behavior. In sufficiently large codebases,
this may require a temporary enforcement period where all effects provide an explicit
dependencies argument.

Outside of migration, relying on a component to render can lead to real bugs,
especially when working with memoization.
@react-sizebot
Copy link

Comparing: 3e9db65...f48f245

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 529.83 kB 529.83 kB = 93.51 kB 93.51 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 651.62 kB 651.62 kB = 114.80 kB 114.80 kB
facebook-www/ReactDOM-prod.classic.js = 675.87 kB 675.87 kB = 118.93 kB 118.93 kB
facebook-www/ReactDOM-prod.modern.js = 666.15 kB 666.15 kB = 117.31 kB 117.31 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 2,143.69 kB 2,133.83 kB = 323.39 kB 321.75 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 2,143.52 kB 2,133.66 kB = 323.37 kB 321.73 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 2,143.52 kB 2,133.66 kB = 323.37 kB 321.73 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 2,139.25 kB 2,129.39 kB = 322.44 kB 320.77 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 2,139.07 kB 2,129.21 kB = 322.42 kB 320.74 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 2,139.07 kB 2,129.21 kB = 322.42 kB 320.74 kB

Generated by 🚫 dangerJS against f48f245

@jbrown215 jbrown215 requested a review from kassens May 22, 2025 21:19
@jbrown215 jbrown215 merged commit 99efc62 into facebook:main May 23, 2025
246 checks passed
github-actions bot pushed a commit that referenced this pull request May 23, 2025
Summary:

To prepare for automatic effect dependencies, some codebases may want to
codemod
existing useEffect calls with no deps to include an explicit undefined
second argument
in order to preserve the "run on every render" behavior. In sufficiently
large codebases,
this may require a temporary enforcement period where all effects
provide an explicit
dependencies argument.

Outside of migration, relying on a component to render can lead to real
bugs,
especially when working with memoization.

DiffTrain build for [99efc62](99efc62)
github-actions bot pushed a commit that referenced this pull request May 23, 2025
Summary:

To prepare for automatic effect dependencies, some codebases may want to
codemod
existing useEffect calls with no deps to include an explicit undefined
second argument
in order to preserve the "run on every render" behavior. In sufficiently
large codebases,
this may require a temporary enforcement period where all effects
provide an explicit
dependencies argument.

Outside of migration, relying on a component to render can lead to real
bugs,
especially when working with memoization.

DiffTrain build for [99efc62](99efc62)
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