Advantages of functional components (and hooks) over class components in React
Functional components have a number of advantages over class components. Perhaps the biggest advantage is simplicity. Functional components are just functions that return JSX code. Syntax is much easier than it is with class components. With functional components, you don’t need to use the confusing this property. You might think that you know how to use this, but class components add a whole different level of complexity. It’s difficult for others to understand your code…