Added update API call to onResultSelect in app.js

This commit is contained in:
Ken Jannette
2018-04-20 17:39:04 -04:00
parent f4b22acccd
commit 41c281b619
2 changed files with 12 additions and 7 deletions

View File

@@ -37,6 +37,10 @@ class BooksApp extends React.Component {
books: [...this.state.books, newBook]
});
});
const newBooks = this.state.books
newBooks.forEach((book) => {
update(book, book.shelf)
})
}
onSelectChange = (e) => {