MyReads project is a bookshelf app that allows you to select and categorize books you have read, are currently reading, or want to read. This is a project for the Udacity's React Fundamentals course, part of the React Nanodegree Program.
In this application, the main page displays a list of "shelves" (i.e. categories), each of which contains a number of books. The three shelves are:
- Currently Reading
- Want to Read
- Read
Each book has a control that lets you select the shelf for that book. When you select a different shelf, the book moves there.
The main page also has a link to /search, a search page that allows you to find books to add to your library.
The search page has a text input that is used to find books. As the value of the text input changes, the books that match that query are displayed on the page, along with a control that lets you add the book to your library.
When a book is on a bookshelf, it has the same state on both the main application page and the search page.
The search page also has a link to / (the root URL), which leads back to the main page.
When you navigate back to the main page from the search page, you instantly see all of the selections you made on the search page in your library.
- install all project dependencies with
npm install - start the development server with
npm start - Open http://localhost:3000 to view it in the browser
APIs used
Method Signature:
getAll();- Returns a Promise which resolves to a JSON object containing a collection of book objects.
- This collection represents the books currently in the bookshelves in your app.
Method Signature:
update(book, shelf);- book:
<Object>containing at minimum anidattribute - shelf:
<String>contains one of ["wantToRead", "currentlyReading", "read"] - Returns a Promise which resolves to a JSON object containing the response data of the POST request
Method Signature:
search(query);- query:
<String> - Returns a Promise which resolves to a JSON object containing a collection of a maximum of 20 book objects.
- These books do not know which shelf they are on. They are raw results only. You'll need to make sure that books have the correct state while on the search page.