An under-appreciated concept in JavaScript is how objects and functions are references, and that directly impacts React performance. If you were to create two functions that are completely identical, they are still not equal. Try for yourself: Objects work the same way.
Full article