Skip to content

Commit 1a77dae

Browse files
committed
Merge pull request #91 from matthewwithanm/advise-node-proptype
Suggest `PropTypes.node` for children
2 parents 4fdceb4 + 808fdc8 commit 1a77dae

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/rules/prop-types.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ As it aptly noticed in
7777
> Most components don't need `this.props.children`, so that makes it extra important
7878
to document `children` in the propTypes.
7979

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

8384
Since 2.0.0 children is no longer ignored for props validation.

0 commit comments

Comments
 (0)