Skip to content

Instantly share code, notes, and snippets.

@ninjaPixel
Created August 10, 2018 17:51
Show Gist options
  • Save ninjaPixel/a978d42ac547d2eac227d7cce66cd012 to your computer and use it in GitHub Desktop.
Save ninjaPixel/a978d42ac547d2eac227d7cce66cd012 to your computer and use it in GitHub Desktop.
The 'fat' version of our meteor app.
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