arrow_backBACK TO DRILLS
Black BeltecosystemPREMIUM
Typing JSX Children to Allow Only HTML Elements
A developer wants a component's children prop typed so that only plain HTML elements like <p> or <span> are accepted, rejecting custom React components as children.
Why is this constraint impossible to express in TypeScript's type system, regardless of how the children prop is typed?