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

Suggest PropTypes.node for children #91

Merged
merged 1 commit into from
May 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/rules/prop-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ As it aptly noticed in
> Most components don't need `this.props.children`, so that makes it extra important
to document `children` in the propTypes.

> If `children` is difficult to figure out which type to use,
one can always use `React.PropTypes.any`
Generally, you should use `React.PropTypes.node` for `children`. It accepts
anything that can be rendered: numbers, strings, elements or an array containing
these types.

Since 2.0.0 children is no longer ignored for props validation.