Source: cirosantilli/react-class-vs-function-component
= React class vs function component
{c}
<React function components> do produce shorter code. But they are also impossible to understand without knowing what is their corresponding class component.
Hooks were introduced much after classes, and just require less code, so everyone is using them now instead of classes.