type a passed component typescript react code example Example: type a passed component typescript react interface ParentCompProps { childComp?: React.ReactNode; }