const [list, setList] = useState([]) const changeStatus = (id) => { setList(list => { const newList = list.slice(); const index = newList.findIndex(i => i.id === id); if (index !== -1) { newList[index].title = '#тес2'; } return newList; }); }