Deleting a specific item on a list with react js
Clash Royale CLAN TAG #URR8PPP Deleting a specific item on a list with react js So I am trying to remove a todo item from its current array and it is not working. When server starts, I tried console.log but no argument is being passed. Todos returns an array . Here's my code: handleTodoDelete = (deleteTodo) => const remainingItems = this.state.todo.filter (todo => return todo !== deleteTodo; ); this.setState( todos: remainingItems ); My return code has this: return ( <li className=completeClass onClick=() => this.handleTodoClick(todo)> todo.description <button onClick= (todo)=>this.handleTodoDelete(todo)>delete</button> </li> It's seems that you're setting the filtering the todo array in state, but you're setting todos . Should you just be messing with todo or todos ? – skylerfenn Aug 13 at 2:34 todo todos todo todos it works when im passing thru ... :( done !=isdone - {this.state.todos.map(todo =...