GithubHelp home page GithubHelp logo

live21-03-react-routing's Introduction

Navigation in React

Your task

In this assessment you are presented with a SPA that uses a homemade router to navigate between pages. The homemade router is good for moving around, but it's not very flexible, and it doesn't rely on URLs for navigation.

Using react-router you are expected to introduce a more robust routing solution to the application.

Stick with the route names already present in the app. For the instructor profile route, use the slug of the instructor as a parameter.

Good luck!

To test your work, run yarn test in the project directory.

Why?

We have learnt that traditional websites are composed of multiple HTML files, each representing a single page. In those traditional websites each URL you type is essentially a path to an HTML file, which might in turn load other files like CSS sheets and JS scripts.

We also learnt that a modern React app works differently. A React app is composed of single HTML file that is manipulated by maaany JS files. We call this composition Single Page Applications (SPA).

As we explained earlier, URLs represent the path to HTML files, but since we only have a single HTML file in a SPA, by default they run with a single URL. For example, everything we have worked on so far never moved from localhost:3000.

But people love URLs! They allow us to share specific webpages easily. If you like something on an online store, you wanna share that specific product, not the home page.

Just like manipulating a single HTML page to display many different things, React can also manipulate the URL bar of the browser!

live21-03-react-routing's People

Contributors

thehasanas avatar lailz avatar mirrorcall96 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.