I\'m trying to redirect the user after a submit button has been pressed in my react app, but redirect never happens. After submit button I\'m sending data via axios to an AP
By assuming you are using react-router v4, you will want to use history object to navigate.
import { withRouter } from 'react-router'; ... handleSubmit = () => { ... this.props.history.push('/moneyform'); } render() { return ( ... ) } export default withRouter(confirmWithdraw); 0 讨论(0) 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复