关于Type xxx is not assignable to type IntrinsicAttributes的一种解决方法(无状态组件)


组件代码:

interface MyProps{
    uiMode:boolean
}

const ChatCpt : React.FunctionComponent<MyProps> = function(props){

    console.log(props.uiMode)
    
    return(
        <div id="chatCpt">

        </div>
    )
}

Author: Maple
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Maple !
  TOC