r/reactjs • u/callensm • Oct 31 '18
Why the hate for React Hooks?
I've been seeing a lot of mixed feelings about React Hooks since it was announced and can't quite figure out why. Sure it's a deviation from the norm, but completely optional and certainly lowers the barrier to entry for new developers.
Can someone explain why all the negative feelings are rising about it?
19
Upvotes
View all comments
Show parent comment
-1
u/leixiaotie Oct 31 '18
... This feels so wrong for me, but it works in most cases. How can I describe it.
It's because js can somehow compare object by it's reference, ex:
Same with object
So both works with
===, but not because it can compare array by value, but by reference, which will not works in some cases.