Created
May 28, 2017 10:08
-
-
Save wzup/cbe34eba037544ee073112fcf9317a0c to your computer and use it in GitHub Desktop.
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
'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