So I created React Todo App with an Object as a Todo List. Removing an item by key works with delete, but brings me back boolean instead of Object with the rest of the items.
deleteTodo = (id) => {
const { todos } = this.state;
this.setState({
todos: delete todos[id],
});
I get this in console:
Warning: Failed prop type: Invalid prop `todos` of type `boolean` supplied to `TodoList`, expected an object.