diff --git a/src/App.js b/src/App.js index 7a9c6d6..6385ae7 100755 --- a/src/App.js +++ b/src/App.js @@ -24,7 +24,8 @@ class BooksApp extends React.Component { onSelectChange = (e) => { const id = e.target.name const newShelf = e.target.value - const books = this.state.books.slice(); // Create local copy to change. + + const books = this.state.books.slice(); books.forEach((book) => { if (book.id === id) { book.shelf = newShelf; diff --git a/src/Bookshelf.js b/src/Bookshelf.js index 00ae9be..28b274d 100644 --- a/src/Bookshelf.js +++ b/src/Bookshelf.js @@ -29,7 +29,7 @@ class Bookshelf extends Component {
- + @@ -93,7 +93,7 @@ class Bookshelf extends Component {