3 ms·
This pattern is fine, but I would make this a component. function ConditionalComponent(props: Props) { if (!props.condition) return null return
by dimgl 5y ago
This pattern is fine, but I would make this a component.
function ConditionalComponent(props: Props) {
if (!props.condition) return null
return <UnderlyingComponent {...props} />
}