[TSX] tsx 컴포넌트 사용 에러

JJeong·2022년 5월 24일
0

에러 코드

TS2786: 'BsButton' cannot be used as a JSX component.   

Its element type 'ReactElement<any, any> | Component<Pick<Props, "text" | "variant" | "onClick" | "href" | "wide" | "disabled" | "bgColor" | "textColor" | "fontWeight" | "size" | "value" | "startIcon" | "endIcon"> & WithWidthProps, any, any> | null' is not a valid JSX element.     

Type 'Component<Pick<Props, "text" | "variant" | "onClick" | "href" | "wide" | "disabled" | "bgColor" | "textColor" | "fontWeight" | "size" | "value" | "startIcon" | "endIcon"> & WithWidthProps, any, any>' is not assignable to type 'Element | ElementClass | null'.       

Type 'Component<Pick<Props, "text" | "variant" | "onClick" | "href" | "wide" | "disabled" | "bgColor" | "textColor" | "fontWeight" | "size" | "value" | "startIcon" | "endIcon"> & WithWidthProps, any, any>' is not assignable to type 'ElementClass'.         

The types returned by 'render()' are incompatible between these types.           

Type 'React.ReactNode' is not assignable to type 'import("C:/Users/bsit/go/src/sharing-platform-web-app/node_modules/@types/react-transition-group/node_modules/@types/react/index").ReactNode'.

해결

??

0개의 댓글