Last active
February 2, 2022 00:18
-
-
Save noramens/2674009be218aab35b79261eaa6f221f to your computer and use it in GitHub Desktop.
Routes from react-router-dom
This file contains 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 Header from './components/common/Header'; | |
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; | |
import Home from './components/pages/Home'; | |
import About from './components/pages/About'; | |
import Blog from './components/pages/Blog'; | |
function App() { | |
return ( | |
<Router> | |
<Header /> | |
<Routes> | |
<Route path="/" element={<Home />} /> | |
<Route path="/about" element={<About />} /> | |
<Route path="/blog" element={<Blog />} /> | |
</Routes> | |
<Footer /> | |
</Router> | |
); | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment