Skip to content

Instantly share code, notes, and snippets.

@haruelrovix
Created December 11, 2018 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haruelrovix/d5bf357efbbf094b26549f40709ec74f to your computer and use it in GitHub Desktop.
Save haruelrovix/d5bf357efbbf094b26549f40709ec74f to your computer and use it in GitHub Desktop.
RNE x RNW: Add second component and Routing
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