Skip to content

Instantly share code, notes, and snippets.

@stepankuzmin
Last active June 10, 2017 14:27
Show Gist options
  • Save stepankuzmin/8aaae62280b2d9eef5adc250df8d431a to your computer and use it in GitHub Desktop.
Save stepankuzmin/8aaae62280b2d9eef5adc250df8d431a to your computer and use it in GitHub Desktop.
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import { ConnectedRouter } from 'react-router-redux';
import Main from './Main';
import Login from './Login';
const App = props => {
const { history } = props;
return (
<ConnectedRouter history={history}>
<Switch>
<Route path="/login" component={Login} />
<Route path="/" component={Main} />
</Switch>
</ConnectedRouter>
);
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment