diff --git a/src/App.js b/src/App.js index 7cd0901..596748b 100755 --- a/src/App.js +++ b/src/App.js @@ -30,13 +30,12 @@ class BooksApp extends React.Component { const id = e.target.name const newShelf = e.target.value let newBook - get(id).then((result) => { newBook = result newBook.shelf = newShelf - }); - this.setState({ - books: [...this.state.books, newBook] + this.setState({ + books: [...this.state.books, newBook] + }); }); }