IS
Size: a a a
IS
j
j
mm
IS
KB
j
YL
T
export class ScreenshotSize {state:
public constructor(
public id: number,
public size: string,
public isActive: boolean
) {}
}
const [sizeScreenshot, setSizeScreenshot] = useState<ScreenshotSize[]>([logic:
new ScreenshotSize(0, "5`5", false),
new ScreenshotSize(1, "6`5", true),
]);
let newState = [...sizeScreenshot];Может быть из-за того, что я меняю только свойство объекта?
newState.forEach((item, i) =>
item.id === index ? item.isActive === true : !item.isActive
);
setSizeScreenshot([...newState]);
s
IS
IS
В
IS
OL
s
IS
AS
ИС