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

User prop spreading util #250

Merged
merged 3 commits into from
May 28, 2016
Merged

User prop spreading util #250

merged 3 commits into from
May 28, 2016

Conversation

levithomason
Copy link
Member

This PR addresses a todo in #247. The getUnhandledProps util provides a way to capture all additional props passed to a component so they can be spread. All props defined in the component's propTypes, defaultProps, and autoControlledProps are removed. Leaving only extra props passed in by the user.

@@ -4,10 +4,11 @@
"ta/frontend"
],
"rules": {
"complexity": [1, 10],
Copy link
Member Author

Choose a reason for hiding this comment

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

Warn above 10.

@levithomason levithomason mentioned this pull request May 28, 2016
24 tasks
"consistent-return": 0,
"no-confusing-arrow": 0,
"react/sort-comp": 1,
"valid-jsdoc": 1
"valid-jsdoc": 0
Copy link
Member Author

Choose a reason for hiding this comment

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

JSDoc comments on classes do not need return statements, there is no way to tell this rule to ignore those. Turned it off, IDEs mostly validate these anyway.

@levithomason levithomason merged commit fb22df8 into master May 28, 2016
@levithomason levithomason deleted the feature/spread-props-util branch May 28, 2016 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant