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 (
<ReactFragment>
<div>
...
</ReactFragment>
)
}
export default withRouter(confirmWithdraw);