1.hashHistory是什么意思?
hashHistory
是react-router中用来路由传值的。
用法:
- 引入包
import {hashHistory} from ‘react-router’; - 路由传值(参数是放在query对象里面)
Search = () => {
hashHistory.push({
pathname: '/。。。',
query: {id: this.state.id},
});
}
借用原作者
hashHistory
是react-router中用来路由传值的。
用法:
Search = () => {
hashHistory.push({
pathname: '/。。。',
query: {id: this.state.id},
});
}
借用原作者