路由bug,有人碰到过吗? You cannot PUSH the same path using hash history

#1

突然发现这个问题!

就是一个路由点击两次后,列表数据就消失了,并报错;

componentDidMount() {

	let { actions } = this.props;
	actions.meetingLoad();
}

上面的这段代码就无法执行。

按理说选中的路由再次点击应该没什么反映才对,怎么react 又执行了 render() 看日志是route 触发的。

请问这个问题错误是发生在哪里?怎么发生的。路由代码如下

  const routes = (
 <Route path="/" component={App}>
	 <IndexRoute component={HomePage} />
	<Route path="home" component={HomePage} />
	<Route path="meetings" component={Meetings} />
	<Route path="/meetings/:mid/cals" component={CalList} />
</Route>)
export default routes



-----------




const state = window.__initialState__ || undefined
const store = configureStore(hashHistory,state)
const history = syncHistoryWithStore(hashHistory, store)

ReactDOM.render(
  <Provider store={store}>
  <Router history={history} routes={routes}/>
</Provider>, document.getElementById('root'))
registerServiceWorker()

const Navigation = ({ className, buttonClassName }) => (
	<nav className={className}>
		<IndexLink  className={buttonClassName} activeClassName="Active" to="/">欢迎</IndexLink >
		<Link className={buttonClassName} activeClassName="Active" to="meetings">会议管理</Link>
	</nav>
)
#2

沙发,自己座

#3

已经搞定,报错也是使用browserhistory 来处理;数据不出来是因为被重新赋值了。

reducer里面里面吧 mount的数据放到state 里面就好了。与报错无关!mark 下