Understanding React Components: Class vs Functional