Skip to content

Instantly share code, notes, and snippets.

@jamesattard
Last active March 29, 2018 09:38
Show Gist options
  • Save jamesattard/d56fea5bdda7ef6ec55aafefef57d1d0 to your computer and use it in GitHub Desktop.
Save jamesattard/d56fea5bdda7ef6ec55aafefef57d1d0 to your computer and use it in GitHub Desktop.
class MyComponent extends Component {
componentDidUpdate() {
if (!!this.props.payload.success) {
this.props.actionCreator();
this.props.history.push("/Dashboard");
}
}
render() {
return (
...
)
}
}
...
export default withRouter(MyComponent)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment