آموزش جاوااسکریپت انجمن ها react js students.splice is not a function پاسخ به: students.splice is not a function

#87542
علی عصار
مشارکت کننده

const deleteStudentHandler = (event , id) => {

let number = studentsState.filter(student => student.id === id)
console.log(number[0].name);
const chosenStudent = studentsState.filter(student => student.name !== number[0].name)
console.log(chosenStudent);
const students = […chosenStudent]
console.log(students);
setStudents(students)
}

in code ham eshkal dasht, alan eslahesh kardam