Warning
Warning: Automatically setting basename using <base href> is deprecated and will be removed in the next major release. The semantics of <base href> are subtly different from basename. Please pass the basename explicitly in the options to createHistory
Imports
import {Router, Route, IndexRoute, IndexRedirect, browserHistory, Redirect} from 'react-router';
import {Provider} from 'react-redux';
History
const history = syncHistoryWithStore(browserHistory, store);
This is my router
<Provider store={store}>
<Router history={history}>
<Route path="/" component={App}>
<IndexRoute component={Landing} onEnter={checkToken}/>
</Route>
<Route path="/demos" component={App} onEnter={checkToken}>
<IndexRoute component={demosList} />
</Route>
<Route path="/categories" component={App} onEnter={checkToken}>
<IndexRoute component={Categories} />
</Route>
<Route path="/users" component={App} onEnter={checkToken}>
<IndexRoute component={Users} />
</Route>
<Route path="/login" component={App}>
<IndexRoute component={login} onEnter={isLoged}/>
</Route>
<Route path="/logout" component={App}>
<IndexRoute component={logout} onEnter={isLogedOut}/>
</Route>
<Route path="/reset" component={App}>
<IndexRoute component={resetPassword}/>
</Route>
</Router>
</Provider>