react中push与replace的区别
replace()用法:
this.props.history.replace('router地址')
注:replace跳转不会形成history,不可返回到上一层。
push()用法
this.props.history.push('router地址')
注:push跳转会形成history,可返回到上一层。
更多web开发、web前端课程相关知识,请查阅 HTML中文网 !!
以上就是react中push与replace的区别是什么?的详细内容,更多请关注0133技术站其它相关文章!