scrimba
React Bootcamp Course
React Router useRouteMatch
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

React Router useRouteMatch
AboutCommentsNotes
React Router useRouteMatch
Expand for more info
App.js
run
preview
console
import React from "react"
import Header from "./components/Header"
import Footer from "./components/Footer"
import Home from "./pages/Home"
import Profile from "./pages/profile/Profile"

import {Switch, Route} from "react-router-dom"

function App() {
return (
<div>
<Header />

<Switch>
<Route exact path="/">
<Home />
</Route>
<Route path="/profile">
<Profile/>
</Route>
</Switch>

<Footer />
</div>
)
}

export default App
Console
/profile
-5:35