Functional components are much cleaner, and I prefer them over class-based ones. The same goes for other developers I know in person.
But at the same time, there is no official recommendation to avoid class-based components. For example, people with a strong OOP "background" would probably prefer class-based components. Because they at least partially follow the OOP paradigm.
I've seen many codebases using hooks most of the time and a top level Class component for Error boundary, as there's no official error boundary hook available.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yep, I agree with you for the most part.
Functional components are much cleaner, and I prefer them over class-based ones. The same goes for other developers I know in person.
But at the same time, there is no official recommendation to avoid class-based components. For example, people with a strong OOP "background" would probably prefer class-based components. Because they at least partially follow the OOP paradigm.
Thanks for adding value to the conversation!
I've seen many codebases using hooks most of the time and a top level Class component for Error boundary, as there's no official error boundary hook available.