Quiero preguntarte si eso es inmutable o no.
// Select all product options that you selected for each product we store it in an array const [selectedProductOptions, setSelectedProductOptions] = useState<ISizeAndColors[] | []>([]); findObj && setSelectedProductOptions(prev => { return prev.map((el => { if(el.product_id === currentProductID) { return { ...el, color, size, amount } } else { return { ...el } } }))Si no es lo que estoy haciendo entonces mal?