React Router参数传递

React Router参数传递

从Header中跳转到list传递数值。
利用在root.js中设置中path="list/id:"。这个为定义的方法
在list中用{this.props.params.id}获取从Header路由传递过来的值
Header中使用<Link to={/list/12341234}>

原文地址:https://www.cnblogs.com/ArielChen/p/7467617.html