react中路由使用js跳转传参,跳转页面this.props是空的,为啥?参数如何获取

//index.js
<Button onClick={this.nextStep.bind(this, record.title)}>详情(中文)</Button>
nextStep = (title) => {
        console.log(title);
    this.props.history.push({
        pathname: '/newsInfo',
        query: {title: title}
    });
};

//newsInfo.js
constructor(prop) {
    super(prop);
    console.log(this);
    this.state = {
        isModalVisible: false
    };
}
//this打印结果

![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/404214425726176.png)


因为域不一样。
()=>{} 写法 和 function(){} 中的this域是不一样的。

<Button onClick={this.nextStep( record.title)}>详情(中文) 因为你methods是箭头函数。不用用bind改变this