Property 'children' does not exist on type 'IntrinsicAttributes & SecondBoxProps'.

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

Property 'children' does not exist on type 'IntrinsicAttributes & Seco…

영리치 0 1,089 2022.11.09 15:21
<ContentDiv ref={listBoxRef}>
{DATA.map((data: any, idx: number) => {
return (
<CheckBox
checked={checked?.[idx]}
onChange={(val: boolean) => onClick(val, idx)}
isLink
>
<Text size="sm">{data.label}</Text>
</CheckBox>
);
})}


위에서 사용하는 컴포넌트


export interface SecondBoxProps {
checked: boolean;
onChange: Function;
isLink?: boolean;
children?: React.ReactNode;
}

const SecondBox: React.FC<SecondBoxProps> = ({
checked,
onChange,
children,
...props


버전 업 후 나타난 이슈임

children의 타입이 정의되지 않았다고 함

React.ReactNode로 정의해주면 됨




Comments

나의 재물운? 연애운은?

AI가 봐주는 내 사주팔자 - 운세박사

https://aifortunedoctor.com/

Category
Magazine
훈남/훈녀
 
 
 
상점
Facebook Twitter GooglePlus KakaoStory NaverBand