-
npm install
-
npm run dev to start the server
- Refactor BooksGrid to use a custom hook named
useGoogleBooks
- the file has been created for you in thehooks
folder.
You should be able to refactor BooksGrid
with your custom hook to enable the component to still work.
-
Google books also accepts the ability to limit the amount of results via a parameter of
maxResults
. Add some more functionality to your custom hook/app to enable the amount of results to be limited -
Create a new hook named
usePublishersBooks
. This hook should accept a publisher and a limit as arguments. It should make a request using thegetPublishersBooks
api function (already created for you).
Use this hook to update the modal when you click a book. The modal should show 3 books by the same publisher of the book.
- Create a hook named
useModal
which will handle the state, as well as the functions to open/close the modal.
- Add some routing and create a route to a publishers page.
/publishers/:publisher
. Use yourusePublishersBooks
hook to list books by a specific publisher.