I have the following object
this.state.books = {"test": "test1"}
I'm trying to delete a key from that object, but I'm not able to. Here's my code
var books = Object.assign({}, this.state.books);
delete books["test"];
this.setState({
books: books,
loading: false
});
setState is not triggering and rendering a new books object