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

[New]: `prop-types`: handle nested destructuring #2300

merged 1 commit into from Jun 6, 2019


None yet
2 participants
Copy link

commented Jun 5, 2019

Fixes #1422. Fixes #296.

This commit fixes cases like const {a: {b}} = this.props;. Nested destructuring are now marked as used recursively.

Copy link

left a comment

Can we add some test cases for where the outer prop name is in props validation, but the inner one is not?


ljharb approved these changes Jun 6, 2019

@ljharb ljharb added the enhancement label Jun 6, 2019

@ljharb ljharb force-pushed the golopot:nested-d branch from 5724d6a to 7d036cf Jun 6, 2019

@ljharb ljharb merged commit 7d036cf into yannickcr:master Jun 6, 2019

2 of 5 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
continuous-integration/travis-ci/push The Travis CI build is in progress
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage decreased (-0.002%) to 97.585%

@golopot golopot deleted the golopot:nested-d branch Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.