3 ms·
Everything that you can do with Hooks can be done with Class components though. Of course Class components also have a lifecycle that is managed by React. But t
by wayneftw 5y ago
Everything that you can do with Hooks can be done with Class components though. Of course Class components also have a lifecycle that is managed by React. But the existence of a managed lifecycle does not make it a framework either.
The article you linked has the answer:
> has it established ways of doing things that are mutually-exclusive with other ways those things might be done?
The answer here is a solid No in the case of React. Nothing is mutually exclusive, because you choose to use Hooks in one component, a Class in another and you can still use React.createElement elsewhere and straight HTML with vanilla JS even somewhere else.