You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
524 B
524 B
id | title | layout | permalink |
---|---|---|---|
children-prop-type-tip | Type of the children prop | docs | children-prop-type-tip.html |
Usually, when manipulating a component's children through this.props.children
, an array is expected. To save an extra array allocation, when children
only contains one single component, it returns the component itself, without the array wrapper.
This means accessing, for example, this.props.children.length
might be misleading since it could be the length property of a single string component.