Created
August 10, 2018 17:51
-
-
Save ninjaPixel/a978d42ac547d2eac227d7cce66cd012 to your computer and use it in GitHub Desktop.
The 'fat' version of our meteor app.
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 { BrowserRouter as Router, Route, Switch} from 'react-router-dom'; | |
import Test from '../../screens/Test/Test.js'; | |
const HomeScreen = props => ( | |
<div> | |
<header> | |
<h1>The App</h1> | |
</header> | |
<p> | |
Some text... | |
</p></div> | |
); | |
export default class App extends Component { | |
render() { | |
return ( | |
<Router> | |
<div className="App"> | |
<Switch> | |
<Route path="/" exact render={routeProps => (<HomeScreen {...routeProps} />)} /> | |
<Route path="/test" exact render={routeProps => (<Test {...routeProps} name="Meteor developer" />)} /> | |
</Switch> | |
</div> | |
</Router> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment