forlooptanzania / ride-my-way

Car pooling app (of developers) by developers for developers in Tanzania
22 stars 6 forks source link

Fundamentals of Routing in react #31

Open giltwizy opened 5 years ago

giltwizy commented 5 years ago

Routing is the ability to move between different parts of an application when a user enters a URL or clicks an element (link, button, icon, image etc) within the application.

Why do we need Routing It allows us to build a single-page web application with navigation without the page refreshing as the user navigates. React Router uses component structure to call components, which display the appropriate information.

How to install its package

npm install --save react-router-dom

Below is the step by step turtorial to implement routing in Navigation bar https://www.kirupa.com/react/creating_single_page_app_react_using_react_router.htm