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

[Fix] fix prefer-exact-props and improve performance #3190

Merged
merged 1 commit into from Jan 27, 2022

Conversation

meowtec
Copy link
Contributor

@meowtec meowtec commented Jan 27, 2022

Use getStatelessComponent instead of getParentStatelessComponent because the second will find the component to it's ancestors. That is incorrect and could cause performance problem.
See the changed test case.

@meowtec meowtec changed the title [Performance] fix prefer-exact-props and improve performance [Fix] fix prefer-exact-props and improve performance Jan 27, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2022

Codecov Report

Merging #3190 (4c668b3) into master (5a2e453) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3190   +/-   ##
=======================================
  Coverage   97.55%   97.55%           
=======================================
  Files         120      120           
  Lines        8288     8288           
  Branches     2982     2982           
=======================================
  Hits         8085     8085           
  Misses        203      203           
Impacted Files Coverage Δ
lib/rules/prefer-exact-props.js 98.82% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a2e453...4c668b3. Read the comment docs.

@ljharb ljharb force-pushed the performance/prefer-exact-props branch from 6b1b12a to 4c668b3 Compare January 27, 2022 19:04
@ljharb ljharb merged commit 4c668b3 into jsx-eslint:master Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants