Using the React.findDOMNode
method that was introduced in v0.13.0 I am able to get the DOM node of each child component that was passed into a parent by mapping over this.props.children
.
However, if some of the children happen to be React Elements rather than Components (e.g. one of the children is a <div>
created via JSX) React throws an invariant violation error.
Is there a way to get the correct DOM node of each child after mount regardless of what class the child is?