Application using react-router-dom
lets do hands-on with Router
Lets build this application with react-router-dom

Our root container using hashRouter
import React from 'react';
import { render } from 'react-dom';
//------------------dashboard-------------------//
import MainComponent from './components/main';
import {HashRouter } from 'react-router-dom'
render(
<HashRouter>
<div className="container">
<MainComponent />
</div>
</HashRouter>
, document.getElementById("app"));Routing for Root components can be added in our main component, our main component will look like
Nexted Routes where we are passing route param as technology name
Last updated
Was this helpful?