Menu Close

Routing-Practice

In this project, let’s build a Routing Practice app by applying the concepts we have learned till now.

Refer to the image below:

routing-practice-desktop-output

Design Files

Click to view

Set Up Instructions

Click to view
  • Download dependencies by running npm install
  • Start up the app using npm start

Completion Instructions

Functionality to be added

The app must have the following functionalities

  • When the About link in the header is clicked, then the page should navigate to the AboutRoute
  • When the Contact link in the header is clicked, then the page should navigate to the ContactRoute
  • When the Home link in the header is clicked, then the page should navigate back to the HomeRoute
  • When an undefined path is provided in the URL, then the page should navigate to the NotFoundRoute
Components Structure

Implementation Files

Use these files to complete the implementation:

  • src/components/App.js
  • src/components/App.css
  • src/components/Header/index.js
  • src/components/Header/index.css
  • src/components/Home/index.js
  • src/components/Home/index.css
  • src/components/About/index.js
  • src/components/About/index.css
  • src/components/Contact/index.js
  • src/components/Contact/index.css
  • src/components/NotFound/index.js
  • src/components/NotFound/index.css

Important Note

Click to view

The following instructions are required for the tests to pass

  • HomeRoute should consist of “/” in the URL path
  • AboutRoute should consist of “/about” in the URL path
  • ContactRoute should consist of “/contact” in the URL path
  • No need to use the BrowserRouter in App.js as we have already included in index.js file

Resources

Image URLs
Colors

Hex: #6d396b
Hex: #555555
Hex: #551e53
Hex: #12022f
Font-families
  • Roboto

Things to Keep in Mind

  • All components you implement should go in the src/components directory.
  • Don’t change the component folder names as those are the files being imported into the tests.
  • Do not remove the pre-filled code
  • Want to quickly review some of the concepts you’ve been learning? Take a look at the Cheat Sheets.
View Source Code
Posted in Development