score:0

The class Components were not very reusable, and they were lacking a sense of interchangeability. It will be ideal to use move away from class components and start using function components. refer to this post

score:9

Since the introduction of hooks in React, you can have state in a function component (cf. useState).

According to React 16.x roadmap post, it might be a good move to slowly transition class components to function components:

Hooks don’t deprecate classes. However, if Hooks are successful, it is possible that in a future major release class support might move to a separate package, reducing the default bundle size of React.


Related Query

More Query from same tag