Passing an object in setState() without creating a new reference
In React, when working with object state, you need to be careful about reference equality. Here’s how to properly update object state without unnecessarily creating new object references: The Problem….