I had this code where I could not pass the key index of the array item map.
arrayItem = [function1, function2, function3]
<div>
{arrayItem.map((item, index) => (<Box key={index}>{item}</Box>}
</div>
ex. for function1
const function1 = (index) => { <div> <h1> test</h1> <Button onClick((index) => console.log(index,"array number")}
It seems that I could not retrieve the index from the map when it goes to function1. The index according the console in the map is numeric but when it goes to the function, it is a className {}. The purpose of this is to retrieve the number of the array so that I could put the button delete and delete the specific array according to the index. Btw, the arrayItems is not static, so it can have more than one functions.
Thanks for the help.