import { NavLink as Link } from 'react-router-dom'
<Link to={
{
pathname:`/要跳转的路径`,
state:{key值:val值}
}
}>
componentWillMount(){
//console.log(this.props.location)//传递过来的所有参数
console.log(this.props.location.state.key值)//val值
}
原文:https://www.cnblogs.com/zlgblog/p/12177303.html