렌더링 전에 빈 상태/null인 경우 응답 구성 요소 하위 항목 감지 "16.8"4" 안녕하세요, 누군가가 (기능하는) 컴포넌트에 자녀가 있는지 확인하는 방법을 알고 있습니다(렌더링하기 전). React.Children.count React.Children.toArray(children) 동작하지 않다 아이들은$$typeof: Symbol(react.element) 암호의 예는 다음과 같습니다. function ContextMenuItems(): JSX.Element | null { if (no-items) return null; ... } class ContextMenu extends React.Component { public render(): JSX.Element | null { if (this.p..