web-interview
web-interview copied to clipboard
[React] 3.什么时候在功能组件( Functional Component )上使用类组件( Class Component )?
答案:如果您的组件具有状态( state ) 或 生命周期方法,请使用 Class 组件。否则,使用功能组件
如果您的组件只是通过父级传入的数据进行展示的话,就是用功能组件
标题标注写反啦