1. 引入包
import {hashHistory} from 'react-router'
2. 跳转传值
参数放在query对象里面
Search = () => {
hashHistory.push({
pathname: '/borrow/searchPage',
query: {category: this.state.category},
});
}
使用
console.log(this.props.location.query.category)