我想要的是(有3个按钮)
class App extends Component {
constructor(props) {
super(props);
this.state = ['india','usa','australia']
}
let onTabChange = () => {
window.history.replaceState(null,null,`${this.state.country.join(',')}`)
}
render() {
return (
<Switch>
<Route path={`/India`} component={India} />
<Route path={`/Usa`} component={Usa} />
<Route path={`/Australia`} component={Australia} />
</Switch>
)}
}
}