i have a problem with array of objects which is inside state. My question is how to change an object value like in example code bellow
const [theArrayOfObjects, setTheArrayOfObjects] = useState([
{ color: "blue", shape: "square" },
{ color: "red", shape: "circle" }
]);
what i want is
[
{ color: "blue", shape: "square" },
{ color: "red", shape: "rectangle" }
]
so in short i just want to update array of objects by changing only this specific value