skip to Main Content

Javascript – The removeItem function is not removing item in my toDO List in react

const [item, setItem] = useState("") const [itemList, setItemList] = useState([]) const [actualItem, setActualItem] = useState([]) function addItem(){ setItemList([...itemList , item]) setActualItem([...itemList , item]) setItem("") } function filterVal(e){ const filteredArr = itemList.filter((item)=> item.includes(e.target.value)) if (filteredArr.length !== 0 && e.target.value.length > 3)…

VIEW QUESTION
Back To Top
Search