React Routing and Component- Learn How to Work With React Routing and React Component Free Tutorial Download
Sometimes you’ve only got 5 minutes to spare. Instead of wasting it on social media, let’s get a 5-minute introduction to React-Router! In this tutorial, we’re going to learn the basics of routing in React by building navigation for a Scrimba knitting shop website. It’s not real, but maybe one day… 😉
What is React-Router, anyway?
Many modern websites are actually made up of a single page, they just look like multiple pages because they contain components which render like separate pages. These are usually referred to as SPAs – single-page applications. At its core, what React Router does is conditionally render certain components to display depending on the route being used in the URL (
/ for the home page,
/about for the about page, etc.).
For example, we can use React Router to connect www.knit-with-scrimba.com/ to www.knit-with-scrimba.com/about or www.knit-with-scrimba.com/shop