Skip to content

Conversation

@michaelfaith
Copy link
Contributor

Summary

Contributing to #32240, this change removes the experimental useEffectEvent checks in the two react hooks ESLint rules. As the api is refined, and the compiler rule(s) are incorporated into this plugin, these checks will be covered then.

@react-sizebot
Copy link

react-sizebot commented Jan 31, 2025

Comparing: 221f300...bec0883

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 = 514.64 kB 514.24 kB = 91.76 kB 91.73 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 = 557.67 kB 556.18 kB = 99.01 kB 98.72 kB
facebook-www/ReactDOM-prod.classic.js = 596.61 kB 595.79 kB = 104.89 kB 104.85 kB
facebook-www/ReactDOM-prod.modern.js = 587.04 kB 586.21 kB = 103.36 kB 103.30 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 92.36 kB 89.02 kB = 15.05 kB 14.54 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 92.36 kB 89.02 kB = 15.05 kB 14.54 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 82.49 kB 79.32 kB = 14.67 kB 14.19 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 82.49 kB 79.32 kB = 14.67 kB 14.19 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 94.56 kB 89.02 kB = 15.31 kB 14.54 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 84.44 kB 79.32 kB = 14.95 kB 14.19 kB
facebook-www/ReactFreshRuntime-dev.classic.js = 13.82 kB 12.37 kB = 3.19 kB 2.99 kB
facebook-www/ReactFreshRuntime-dev.modern.js = 13.82 kB 12.37 kB = 3.19 kB 2.99 kB
oss-experimental/react-refresh/cjs/react-refresh-runtime.development.js = 13.80 kB 12.36 kB = 3.18 kB 2.98 kB
oss-stable-semver/react-refresh/cjs/react-refresh-runtime.development.js = 13.80 kB 12.36 kB = 3.18 kB 2.98 kB
oss-stable/react-refresh/cjs/react-refresh-runtime.development.js = 13.80 kB 12.36 kB = 3.18 kB 2.98 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.js = 572.40 kB 570.91 kB = 102.61 kB 102.33 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 557.67 kB 556.18 kB = 99.01 kB 98.72 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.production.js = 94.25 kB 93.93 kB = 19.49 kB 19.44 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.production.js = 92.33 kB 92.01 kB = 19.07 kB 19.02 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.development.js = 149.08 kB 148.57 kB = 27.72 kB 27.63 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js = 148.81 kB 148.30 kB = 27.49 kB 27.41 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.production.js = 90.80 kB 90.48 kB = 18.74 kB 18.69 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.production.js = 89.79 kB 89.47 kB = 18.75 kB 18.70 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.production.js = 89.79 kB 89.47 kB = 18.75 kB 18.70 kB
oss-experimental/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.development.js = 144.35 kB 143.84 kB = 26.76 kB 26.67 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.production.js = 87.73 kB 87.42 kB = 18.33 kB 18.29 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.production.js = 87.73 kB 87.42 kB = 18.33 kB 18.29 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.production.js = 86.29 kB 85.98 kB = 18.01 kB 17.96 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.production.js = 86.29 kB 85.98 kB = 18.01 kB 17.96 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.development.js = 135.37 kB 134.86 kB = 25.33 kB 25.23 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.node.development.js = 135.37 kB 134.86 kB = 25.33 kB 25.23 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js = 134.15 kB 133.64 kB = 25.02 kB 24.93 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.edge.development.js = 134.15 kB 133.64 kB = 25.02 kB 24.93 kB
oss-stable-semver/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.development.js = 131.38 kB 130.87 kB = 24.49 kB 24.41 kB
oss-stable/react-server-dom-parcel/cjs/react-server-dom-parcel-server.browser.development.js = 131.38 kB 130.87 kB = 24.49 kB 24.41 kB
react-native/shims/ReactNativeTypes.js = 8.37 kB 8.32 kB = 2.19 kB 2.19 kB
oss-experimental/react/cjs/react.development.js = 46.15 kB 45.83 kB = 10.53 kB 10.47 kB
oss-experimental/react/cjs/react.production.js = 18.42 kB 18.13 kB = 4.77 kB 4.71 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.development.js = 32.24 kB 31.60 kB = 5.77 kB 5.69 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.development.js = 32.24 kB 31.60 kB = 5.77 kB 5.69 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.development.js = 32.24 kB 31.60 kB = 5.77 kB 5.69 kB
oss-experimental/react-debug-tools/cjs/react-debug-tools.production.js = 28.72 kB 28.15 kB = 5.64 kB 5.56 kB
oss-stable-semver/react-debug-tools/cjs/react-debug-tools.production.js = 28.72 kB 28.15 kB = 5.64 kB 5.56 kB
oss-stable/react-debug-tools/cjs/react-debug-tools.production.js = 28.72 kB 28.15 kB = 5.64 kB 5.56 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 92.36 kB 89.02 kB = 15.05 kB 14.54 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 92.36 kB 89.02 kB = 15.05 kB 14.54 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 82.49 kB 79.32 kB = 14.67 kB 14.19 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 82.49 kB 79.32 kB = 14.67 kB 14.19 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js = 94.56 kB 89.02 kB = 15.31 kB 14.54 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js = 84.44 kB 79.32 kB = 14.95 kB 14.19 kB
facebook-www/ReactFreshRuntime-dev.classic.js = 13.82 kB 12.37 kB = 3.19 kB 2.99 kB
facebook-www/ReactFreshRuntime-dev.modern.js = 13.82 kB 12.37 kB = 3.19 kB 2.99 kB
oss-experimental/react-refresh/cjs/react-refresh-runtime.development.js = 13.80 kB 12.36 kB = 3.18 kB 2.98 kB
oss-stable-semver/react-refresh/cjs/react-refresh-runtime.development.js = 13.80 kB 12.36 kB = 3.18 kB 2.98 kB
oss-stable/react-refresh/cjs/react-refresh-runtime.development.js = 13.80 kB 12.36 kB = 3.18 kB 2.98 kB

Generated by 🚫 dangerJS against 2a91f47

…useEffectEvent

Contributing to facebook#32240, this change removes the experimental `useEffectEvent` checks in the two react hooks eslint rule.  As the api is refined, and the compiler rule(s) are incorporated into this plugin, these checks will be covered then.
@michaelfaith michaelfaith force-pushed the fix/remove-experimental-eslint-rule-checks branch from 02c1846 to 2a91f47 Compare January 31, 2025 00:46
@michaelfaith michaelfaith marked this pull request as ready for review January 31, 2025 01:54
@controversial
Copy link

For what it’s worth, the current useEffectEvent behavior in eslint-plugin-react-hooks@experimental is very useful for me while using useEffectEvent either through user-land implementations or through react@experimental.

However, I understand of course that the hook is experimental and its support in eslint-plugin-react-hooks is experimental, so none of this behavior is guaranteed/supported.

Looking forward to hopefully having this hook available in a stable release eventually, along with support in the future of the eslint plugin.

@michaelfaith
Copy link
Contributor Author

Closing this as the team decided to leave it as-is for now.

poteto added a commit that referenced this pull request Feb 16, 2025
…pe declarations (#32240)

<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

This change converts the eslint hooks plugin to typescript, which also
allows us to include type declarations in the package, for those using
[typescript eslint
configs](https://eslint.org/blog/2025/01/eslint-v9.18.0-released/#stable-typescript-configuration-file-support).

### Constituent changes that should land before this one

- [x] ~#32276
- [x] #32279
- [x] #32283
- [x] #32393
- [x] #32396

Closes #30119

---------

Co-authored-by: Lauren Tan <poteto@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Feb 16, 2025
…pe declarations (#32240)

<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

This change converts the eslint hooks plugin to typescript, which also
allows us to include type declarations in the package, for those using
[typescript eslint
configs](https://eslint.org/blog/2025/01/eslint-v9.18.0-released/#stable-typescript-configuration-file-support).

### Constituent changes that should land before this one

- [x] ~#32276
- [x] #32279
- [x] #32283
- [x] #32393
- [x] #32396

Closes #30119

---------

Co-authored-by: Lauren Tan <poteto@users.noreply.github.com>

DiffTrain build for [5adf402](5adf402)
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.

5 participants