Created
July 5, 2015 22:39
-
-
Save melihmucuk/6eaf3657cb44bf27dd84 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
componentDidMount: function() { | |
Api.getToken().then((response) => { | |
this.setState({ | |
token: response.access_token, | |
}); | |
}).then(()=>{ | |
Api.getAllPosts(this.state.token,0).then((response)=> { | |
this.setState({ | |
dataSource : this.state.dataSource.cloneWithRows(response.posts), | |
loaded : true | |
}); | |
}).done(); | |
}).done(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment