Add React.Children.count docs
Ben Alpert committed
Jul 16, 2014 at 23:19 UTC
ba5c7ff5077ebb1313143b4667f8efdc1f9b90ff
1 file changed
+8
docs/docs/ref-01-top-level-api.md
+8
@@ -117,6 +117,14 @@ React.Children.forEach(object children, function fn [, object context])
117
118
Like `React.Children.map()` but does not return an object.
119
120
+#### React.Children.count
121
+
122
+```javascript
123
+number React.Children.count(object children)
124
+```
125
+
126
+Return the total number of components in `children`, equal to the number of times that a callback passed to `map` or `forEach` would be invoked.
127
+
128
#### React.Children.only
129
130
```javascript