React Class components vs Functional components
问题 Before React16 , class components were used over functional components whenever there is a need to use state or lifecycle methods in your component. In the latest release react introduced Hooks and Effects using which we can use state and lifecycle methods inside our functional components . So is there any reason why still the class components exists? Is there any cases we still have to choose class components over functional 回答1: Here you can see the cases where you will need class