|
|
|
|
|
by invaliduser
488 days ago
|
|
Not primarily, as primarily it was just "we're the V in MVC", and people were using classes. The hooks came when the react team got on the "functional programming" wagon, and suddenly everything was about immutability, side effects, etc. and very little about giving control to the developers on their components life cycle. |
|
Hooks came as no surprise to anyone who paid attention, as the recommended way to write components since at least 2016 was in the stateless functional style whenever possible, and many of us used recompose[1] to simulate hooks long before their introduction.
[0] https://github.com/reactiflux/q-and-a/blob/master/jordan-wal...
[1] https://github.com/acdlite/recompose