I have problem with removeItem function (it should remove current that button is nested in, and item from array on this.state.list), no code currentl
_deleteTodo(index) {
console.log("delete " + index);
this.state.todos.splice(index, 1);
this.setState({
todos: this.state.todos.filter(i => i !== index)
});
}
I had a problem with splice and i honestly don know why. However this method work for me and you can try it! Ps. If anybody know why splice is not working with state and index please let me know i am curious!