Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
gibberclow14yWhy are they not equal, n arr2 is the same length as there exists no way to distinguish them...
-
React Hooks only compare the dependency array up to the shorter of the two lengths and treat them equal if one begins with the other.
Who thought this wasn't a horrible idea?
Related Rants
Friendly reminder that if every element of one array is equal to the corresponding element of another array that doesn't mean the arrays are equal. I hope next time I'll think of this before spending a day debugging everything else.
rant
equality
array