Check if React component is empty or has no child component
<p>How do I check if a React component is empty or has no child component? For example if I have a component called Component A, how can I check if it contains Component B? </p>