
Why does React state need a new object/array?
If you have been using React for a while, you are familiar with how state update works. There are a lot of internal optimizations that React makes for faster rendering. And one of the implementation details of the React internals is that it does a check of whether the given...