- Published
- Author
- Ayush SrivastavaSystem Analyst
React.ChildrenWe can use the
React.Children APIs to modify elements created by React before they’re rendered. It provides utilities for dealing with the this.props.children opaque data structure.For example :-
Code
React.Children.count(children)Returns the total number of components in
children, equal to the number of times that a callback passed to map or forEach would be invoked