React Router, a popular React library,to manage navigation and rendering of components in react. In web development, routing is the process of matching a URL to a view, or the set of components being rendered. React Itself doesn't have built in routing features. Many developer rely on React Router,an external library designed specifically for React.
This tutorial uses React Router version 4.1.1
This demonstration is divided into 9 parts. Each part is a seperate folder
- 01-introduction
- 02-declaring-routes
- 03-inline-rendering
- 04-active-links
- 05-passing-props-to-routes
- 06-url-parameters
- 07-nesting
- 08-changing-routes-programmatically
- 09-404-not-found
Each folder has its own instructions.
This tutorial is built using create-react-app
.
git clone https://github.com/zainulabidin302/react-router-tutorial-v4
cd react-router-tutorial-v4/01-introduction
npm install
npm start
open your browser and navigate to http://localhost:3000