扫码关注官方订阅号
react route 更新到4.1了,在事件里面跳转路由之前用的browserHistory.push更新之后不使用Link跳转,在绑定的事件中使用什么进行跳转呢,在react route没看到介绍
Following the voice in heart.
import PropTypes from 'prop-types' //组件内 static contextTypes = { router: PropTypes.object } //跳转代码: this.context.router.history.push(url)
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
Following the voice in heart.