DEV Community

Discussion on: React: Lifting state up is killing your app

Collapse
 
aigoncharov profile image
Andrey Goncharov

Hi Bessem!

The second one mutates the array, while the first one creates a brand new one. See reactjs.org/docs/state-and-lifecyc...