redundantAspectRatioConstraintThis component already renders a uiaspectratioconstraint internally. Passing one as a child is redundant and will cause layout issues.small-rules/no-redundant-aspect-ratio-constraintDisallow redundant uiaspectratioconstraint children inside components that already manage their own aspect ratio internally.
redundantAspectRatioConstraintThis component already renders a uiaspectratioconstraint internally. Passing one as a child is redundant and will cause layout issues.This rule does not accept options.
const UI_ASPECT_RATIO_CONSTRAINT = <uiaspectratioconstraint AspectRatio={1.5} />;
function LabelSpritesheet({ children }: { children?: React.ReactNode }) { return ( <imagelabel> {children} <uiaspectratioconstraint AspectRatio={1.5} /> </imagelabel> );}
const view = ( <LabelSpritesheet sprite="icon"> {UI_ASPECT_RATIO_CONSTRAINT} </LabelSpritesheet> );function LabelSpritesheet({ children }: { children?: React.ReactNode }) { return ( <imagelabel> {children} <uiaspectratioconstraint AspectRatio={1.5} /> </imagelabel> );}
const view = ( <LabelSpritesheet sprite="icon"> <uigradient Color={gradient} /> <textlabel Text="hello" /> </LabelSpritesheet> );