对于在hooks+typescript的项目中封装组件的两种不同的写法
//1、
const MyLoading: React.FC<Props> = (props) => {
return (<></>)
}
//2、
const MyLoading1 = ({ ...props }: Props) => {
return <></>
}
有人知道具体有什么区别么??
对于在hooks+typescript的项目中封装组件的两种不同的写法
//1、
const MyLoading: React.FC<Props> = (props) => {
return (<></>)
}
//2、
const MyLoading1 = ({ ...props }: Props) => {
return <></>
}
有人知道具体有什么区别么??