I use browser history and here is my code in routes.js
export default ( <Router history={browserHistory}> <Route path="/" component={Main}> <Route path="home/:username" component={Home}> <IndexRoute component={HomeContent}></IndexRoute> <Route path="widget/:second" component={Widget}></Route> <Route path="email/:second" component={Email}> <Route path="compose" component={ComposeEmail}></Route> <IndexRoute component={CheckEmail}></IndexRoute> </Route> <Route path="social/:second" component={Social}></Route> <Route path="calendar/:second" component={Calendar}></Route> </Route> <IndexRoute component={Login}></IndexRoute> </Route> </Router> );
and I used this.context.router.push ('/') to do the navigation. and I donβt know why this warning continues to be displayed in my console?
"Warning: [react-router] `Router` no longer defaults the history prop to hash history. Please use the `hashHistory` singleton instead."
I already read the documentation at https://github.com/reactjs/react-router/blob/master/upgrade-guides/v2.0.0.md#no-default-history , but that really doesn't help.
I appreciated any help :)
source share