想问一下两种写法的区别
来源:5-5 用useContext存储全局用户信息

ericka4381368
2022-04-03
就是({children}: {children: ReactNode})
和(children: ReactNode)
写回答
1回答
-
Nolan
2022-04-06
{children}传的是prop,使用的时候是<Comp children={xxx}
而(children)这种传法,对于组件来说是不对的。。。完全不是在传prop
00
相似问题