Giter VIP home page Giter VIP logo

react-module-7's Introduction

Library App

Demo

https://alchemy-react-library-app.netlify.app

Learning Objectives

  • Create the illusion of multiple pages in a Single Page Application routes by using react-router.
  • Use props.match.params or the useParams hook to get the :id in a path for creating a List/Detail pattern with react-router.
  • Use <Link> to create links that navigate a Single Page Application.

Description

Get started

Your local library hired a developer to build an interface for their database of books. Unfortunately, the previous developer ended up taking another job while leaving the library app unfinished. Luckily, the main page components have been created. However, there's currently no way to navigate to the different pages as the app hasn't been configured with a router!

Your task is to finish off the remaining work by adding the necessary routes to the App.jsx file, as well as adding links to the different pages. You need to create the following routes:

  • /books
    • This page lists all the books in the library's database.
  • /books/:id
    • This page shows the details for a single book, such as its author and genre.

Take a look through the components directory to find the existing pages. Each book title in the book list should link to the corresponding book detail view. Note that you'll have to update the book detail view to use the ID that comes from the route path to be able to view different books.

Acceptance Criteria

  • A user can view a list of books
  • A user can select a book from the list and see details about that book
  • A user can click a link from the book detail page to go back to the list of books

Rubric

Task Points
/books route 3
/books/:id route 3
BookDetails gets the id from the URL path 2
Book titles from list view Link to book details 1
"Back to Catalog" Link added to BookDetails 1

react-module-7's People

Contributors

hathaway-shan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.