Created
January 4, 2019 08:53
-
-
Save supachaic/66eff2945a233c7d3f7e9c1752943626 to your computer and use it in GitHub Desktop.
Import ImageInput component and create new Route
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 { Route, Router } from 'react-router-dom'; | |
import createHistory from 'history/createBrowserHistory'; | |
import './App.css'; | |
import Home from './views/Home'; | |
import ImageInput from './views/ImageInput'; | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> | |
<Router history={createHistory()}> | |
<div className="route"> | |
<Route exact path="/" component={Home} /> | |
<Route exact path="/photo" component={ImageInput} /> | |
</div> | |
</Router> | |
</div> | |
); | |
} | |
} | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment