In chapter 12, when implementing the Delete Book functionality, the UUID is added to the initial state book, but there is not any code that adds a UUID to additional books added. Therefore, when deleting a book, the ID of the book is undefined, so all books other than the initial one (which all have undefined IDs) are deleted.

One way to add the UUID for other books would be in the ADD_BOOK case of the bookReducer. It could go from:

      return {
        books: [
          ...state.books,
          action.book
        ]
      }


to

      return {
        books: [
          ...state.books,
          {
            ...action.book,
            id: uuidV4(),
          },
        ]
      }


When I made this change, deletion started working for me.

Also, interestingly, before I read the delete section I tried to implement it myself. I just tried using triple-equals to compare the book objects, and that seemed to work! With any system that would use persistence, though, having a unique ID certainly makes sense.
Hi, I had to make a few minor styling changes to make the Star Wars App look right:


  • - The React Navigation back arrow was showing as blue on iOS, and wasn't visible on Android (presumably it was black). To make it yellow, I had to set People.navigationOptions.headerTintColor to '#ffe81f'.
    - Since I'm an iOS user, I'm not used to the fact that the header by default appears left-aligned, not centered. So the fact that the header title was completely flush with the left-hand side. I was able to fix this by adding `marginLeft: 20, marginRight: 20` to the style of the header Image. (The right margin keeps it centered on iOS)


  • Thanks for your hard work on the book!
    In section 1.4.1 it says “JSX makes React and React Native a lot more readable, easier to read, and easier to maintain.”

    "Readable" and "easier to read" are repetitive; maybe one can be removed, or else one of them was intended to say something different.