Javascript – Spread operator overwrites the previous value in react
I am trying to add all added images to a state, so I use spread operator. I am not sure what I am doing wrong, since it just overwrites the previous value. It seems that I am missing something. codesandbox…