scrimba
Frontend Career Path
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

Building out the Header Component
AboutCommentsNotes
Building out the Header Component
Expand for more info
src
app.js
run
preview
console
import React from 'react';
import { BrowserRouter as Router, Switch } from 'react-router-dom';
import { Route } from 'react-router-dom';
import * as ROUTES from './constants/routes';
import Home from './pages/home';

export function App() {
return (
<Router>
<Switch>
<Route path={ROUTES.SIGN_IN}>
<p>I will be the sign in page</p>
</Route>
<Route path={ROUTES.SIGN_UP}>
<p>I will be the sign up page</p>
</Route>
<Route path={ROUTES.BROWSE}>
<p>I will be the browse page</p>
</Route>
<Route path={ROUTES.HOME}>
<Home />
</Route>
</Switch>
</Router>
);
}
Console
/
-12:47