带参数页面跳转
this.props.history.pushState({passParam: true}, "/targetURL");
第一个参数为你页面跳转时,需要传递的参数,如果不需要传参数,则为null。
第二个参数为跳转目标页面。
目标页面获取参数
let temp = this.props.location.state;
temp则是刚才页面跳转时所传递的参数
第二种:
onClick={this.goPage.bind(this, '/map/' + record.phoneMac)}
this.props.history.replace(path)
this.state = {
phoneMacId:this.props.match.params.id,
};