import React, { Component } from 'react';
//引入hashHistory
import {hashHistory} from 'react-router'
class About extends Component{
constructor(props){
super(props)
}
// 事件执行
tap(){
hashHistory.push('/other')
}
render(){
return(
<div>
<h2>About</h2>
//点击触发事件
<button onClick={this.tap.bind(this)}>跳转到other</button>
</div>
)
}
}
export default About