react router 的push replace

摘要

咱们在作一些query 操做的时候,常常会须要同步至url, 在这里咱们能够使用 react-router-redux 实现便可javascript

import { push } from 'react-router-redux';


this.dispath(push({
  path: 'xx',
  search: 'xx',
}));

二者的区别

push 是往 history 里面增长一层堆栈,
history 是直接替换当前urljava

相关文章
相关标签/搜索