Skip to content

Commit

Permalink
refactor: minor: Better variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
Helio Ricardo committed Sep 18, 2017
1 parent ebc1a26 commit df28eab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class BooksApp extends React.Component {
BooksAPI
.update(book, shelf)
.then(() => BooksAPI.get(book.id))
.then(book => {
.then(updatedBook => {
this.setState(prevState => ({
books: prevState.books.map(actualBook => (
(actualBook.id === book.id) ? book : actualBook
books: prevState.books.map(book => (
(book.id === updatedBook.id) ? updatedBook : book
))
}))
})
Expand Down

0 comments on commit df28eab

Please sign in to comment.