Created
February 12, 2023 08:36
-
-
Save jatinkumar725/e54b715692a358a49f534b800d8897ec to your computer and use it in GitHub Desktop.
Build First React App ( Updated App.js )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import About from './Pages/About'; | |
import Home from './Pages/Home'; | |
import Contact from './Pages/Contact'; | |
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; | |
import SideBar from './Components/SideBar'; | |
const App = () => { | |
return ( | |
<div className="container-fluid"> | |
<div className="row"> | |
<Router> | |
<SideBar /> | |
<div className="col-10 mt-4" style={{ marginLeft: "210px" }}> | |
<Routes> | |
<Route path='/' element={<Home />} /> | |
<Route path='/contact' element={<Contact />} /> | |
<Route path='/about' element={<About />} /> | |
</Routes> | |
</div> | |
</Router> | |
</div> | |
</div> | |
) | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment