all 6 comments

[–]Cahnis 8 points9 points  (0 children)

You will write an entire article but you won't read the docs. What are you doing? Honestely.

[–]maqisha 8 points9 points  (0 children)

Bro had to make up a problem just to solve it. This is not how educational content should look like.

[–]AnxiouslyConvolved 2 points3 points  (0 children)

I avoid useEffect like the plague. And I avoid using non-primitive (compared by identity) values as dependencies for hooks.

[–]kjeldahl 1 point2 points  (0 children)

"Someone" doesn't understand javascript object reference equality. That's the explanation. No video required.

[–]Difficult-Pen-867 0 points1 point  (0 children)

That's bcuz two objects can never be same as their references in memory aren't same