react hooks中使用路由跳转 koupou 2021-08-31 940 阅读1分钟 import {useHistory} from 'react-router-dom' const component = () => { const history = useHistory(); history.push('path'); }