3 ms·
Hooks is not really OOP. The original OOP interface was abandoned because it lead to a very complicated lifecycle that was hard to reason about.
by continuational 4y ago
Hooks is not really OOP. The original OOP interface was abandoned because it lead to a very complicated lifecycle that was hard to reason about.
- pjmlp 4y agoExcept the little detail that JavaScript is an OOP language in the linage of SELF, where even basic types have methods.
- Scarbutt 4y agoI'm referring to the implementation of React, not its API.
- yamtaddle 4y agoCan confirm, unless it's changed radically since I last looked at it, yes, everydamnthing in React ends up as an object representing a component, and I don't just mean in the way that JS functions are technically also objects.