react-router4.x有三种模式
* BrowserRouter
* HashRouter
* MemoryRouter
在使用HashRouter进行开发过程中,会遇到这个问题
Warning: hash history cannot push state it is ignored
解决办法是使用Object对象方式传参就可以了
this.props.history.push({ pathname: '/' }) // hashRouter (正确)
// this.props.history.push('/', {}) // BrowserRouter
哈哈哈哈,天生我才必有用!