Created
December 11, 2018 22:41
-
-
Save haruelrovix/d5bf357efbbf094b26549f40709ec74f to your computer and use it in GitHub Desktop.
RNE x RNW: Add second component and Routing
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 React, { Component } from 'react'; | |
import Home from './Components/Home'; | |
import CommitList from './Components/Commit/CommitList'; | |
import { Route, Router, Switch } from './Utils/Routing'; | |
class App extends Component { | |
render() { | |
return ( | |
<Router> | |
<Switch> | |
<Route exact path="/" component={Home} /> | |
<Route exact path="/commit" component={CommitList} /> | |
</Switch> | |
</Router> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment