How to dynamically create arrays in state?

Viewed 79

I wanted to create dynamic blocks with the addition of files, but due to the fact that the files have a common state, the files are added to all blocks, and I do not understand how to make a separate array with the files of this block created when a file is added to a separate block, and this array of files was added to one common state, for the second day I can not figure out how to do this, I put in a working violin, I ask for help with advice, or show how this can be done in practice

my wrong option: https://codesandbox.io/s/trusting-cdn-oqt6l?from-embed=&file=/src/addedFiles.js

1 Answers
Related