react跳转路由

1.标签式跳转

import {
    
     Link } from 'react-router-dom'
<Link to="/About"></Link>

2.编程式跳转

<div onClick={
    
     () => this.props.history.push("/About")}>跳转示例</div>

猜你喜欢

转载自blog.csdn.net/weixin_42821697/article/details/111183681