Created
August 30, 2018 07:46
-
-
Save kartikag01/09295d052967830267d02505b7095ff3 to your computer and use it in GitHub Desktop.
After ComponentWillMount lifecycle change
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
| constructor(props) { | |
| super(props); | |
| this.state = { loading: true }; | |
| } | |
| componentDidMount() { | |
| this.props.fetchData(); // action dispatch | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment