Skip to content

Instantly share code, notes, and snippets.

@wzup
Created May 28, 2017 10:08
Show Gist options
  • Save wzup/cbe34eba037544ee073112fcf9317a0c to your computer and use it in GitHub Desktop.
Save wzup/cbe34eba037544ee073112fcf9317a0c to your computer and use it in GitHub Desktop.
'use strict';
const NODE_ENV = process.env.NODE_ENV || 'development';
const React = require('react');
import { BrowserRouter as Router, Route, Link, Switch } from 'react-router-dom';
const App = require('./App');
const Index = require('./Index');
const About = require('./About');
function getRoutes(params) {
return(
<App {...params.props}>
<Switch>
<Route exact path="/" component={Index} />
<Route path="/about" component={About} />
</Switch>
</App>
)
}
module.exports = getRoutes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment