Created
December 3, 2018 02:54
-
-
Save jikkujose/d81a71b00b5d93bf60ebe334742f81ab to your computer and use it in GitHub Desktop.
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
yarn add react-router-dom --save | |
import { BrowserRouter as Router, Switch, Route } from "react-router-dom" | |
<Router basename={basename}> | |
<Switch> | |
<Route exact path="/" component={Home} /> | |
<Route exact path="/blog" component={Blog} /> | |
<Route | |
exact | |
path="/blog/tech-stack" | |
component={() => <Post {...techStack} />} | |
/> | |
<Route path="*" component={NotFound} /> | |
</Switch> | |
</Router> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment