Last active
March 29, 2018 09:38
-
-
Save jamesattard/d56fea5bdda7ef6ec55aafefef57d1d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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