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

Add RulesOfHooks support for use #25370

Closed
wants to merge 6 commits into from
Closed

Conversation

poteto
Copy link
Member

@poteto poteto commented Sep 30, 2022

Stack from ghstack (oldest at bottom):

Usage of the new use hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

[ghstack-poisoned]
poteto added a commit that referenced this pull request Sep 30, 2022
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

ghstack-source-id: 5d40c7262abb36e6d0abb89f80bdbfbe57163377
Pull Request resolved: #25370
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Sep 30, 2022
@sizebot
Copy link

sizebot commented Sep 30, 2022

Comparing: 338e6a9...27e5f3e

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.min.js = 135.46 kB 135.46 kB = 43.41 kB 43.41 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 147.72 kB 147.72 kB = 47.17 kB 47.17 kB
facebook-www/ReactDOM-prod.classic.js = 491.70 kB 491.70 kB = 87.49 kB 87.49 kB
facebook-www/ReactDOM-prod.modern.js = 477.00 kB 477.00 kB = 85.24 kB 85.24 kB
facebook-www/ReactDOMForked-prod.classic.js = 491.70 kB 491.70 kB = 87.49 kB 87.49 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 +0.44% 91.13 kB 91.52 kB +0.24% 21.55 kB 21.60 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.min.js +0.38% 26.78 kB 26.88 kB +0.26% 9.10 kB 9.12 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +0.35% 91.00 kB 91.32 kB +0.20% 21.53 kB 21.57 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +0.35% 91.00 kB 91.32 kB +0.20% 21.53 kB 21.57 kB

Generated by 🚫 dangerJS against 27e5f3e

Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

[ghstack-poisoned]
poteto added a commit that referenced this pull request Sep 30, 2022
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

ghstack-source-id: 35b7e1c341500cce364d5e006cb36e3ee12553d2
Pull Request resolved: #25370
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

[ghstack-poisoned]
poteto added a commit that referenced this pull request Sep 30, 2022
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

ghstack-source-id: fe4e7995be379f153a7ef1d1dd28bfa5be785427
Pull Request resolved: #25370
@poteto poteto requested review from acdlite and Huxpro September 30, 2022 16:47
poteto added a commit that referenced this pull request Oct 4, 2022
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

ghstack-source-id: fe4e7995be379f153a7ef1d1dd28bfa5be785427
Pull Request resolved: #25370
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

[ghstack-poisoned]
poteto added 2 commits October 4, 2022 11:51
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

[ghstack-poisoned]
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

[ghstack-poisoned]
poteto added a commit that referenced this pull request Oct 4, 2022
Usage of the new `use` hook needs to conform to the rules of hooks, with
the one exception that it can be called conditionally.

ghstack-source-id: 7ea5beceaf2c080f2c48821b5117bdd0c1194836
Pull Request resolved: #25370
Copy link
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

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

Yay! I don't know the linter codebase very well but the behavior looks correct to me

@poteto poteto closed this in 3fd9bd8 Oct 4, 2022
@poteto poteto deleted the gh/poteto/3/head branch October 4, 2022 16:41
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.

4 participants