From 808fdc8049d190bd128dae81b37fa17c5818365e Mon Sep 17 00:00:00 2001 From: Matthew Dapena-Tretter Date: Fri, 29 May 2015 18:27:20 -0400 Subject: [PATCH] Suggest `PropTypes.node` for children --- docs/rules/prop-types.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/rules/prop-types.md b/docs/rules/prop-types.md index 73c1f26ebe..7ad9263712 100644 --- a/docs/rules/prop-types.md +++ b/docs/rules/prop-types.md @@ -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.