具体原因能说明一下吗
class和function都用的,用function主要原因是hooks火了
你可以到github上找,很多的,比如antd-design-pro里很多都用了function组件,class也用到了