ayushsrivastava
Wed Jan 11 2023
React.Children
We 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 :-
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