const handleTextColor = (e) => {
const test = e.currentTarget.style.backgroundColor;
const index = texts.findIndex((text) => text.id === selectedId);
const copy = [...texts];
copy[index].color = test;
setTexts(copy);
};
이런식으로 일단 해줬는데 잘되네요.. const test 로 useState안쓰고했습니다..