Typescript Class Vs Functional Components