react组件中的类调用construcor、super方法你知道多少?

constructor:在类中作为一个钩子函数,有constructor钩子函数的时候,可以定义state,如果用户不定义state的话,有无constructor钩子函数没啥区别;

super:

 

posted @ 2020-03-24 17:42  KG-work-space  阅读(301)  评论(0)    收藏  举报