I have a weird issue, where when I for example do this const data = [...businessCategories];
and make changes to the data variable like this data[itemIndex].selected = true;
. What happens is the businessCategories
variable get changed as well as data. I don’t understand why this happpend since I copying values only not reference.