How would I remove a specific id in this setup. I tried to use filter: setNotesDummyData(notesDummyData.filter((o) => { myCondition })); inside the onChangeItemName function but can't return right conditions so only one item will get removed.
const NotesContainer = ({
}) => {
const [notesDummyData, setNotesDummyData] = useState([
{
id: '5',
title: 'Holland',
},
{
id: '7',
title: 'Russia',
},
]);
const onChangeItemName = (itemId) => {
//Remove item with specific itemId
};