Created
February 16, 2018 17:38
-
-
Save RobertFischer/aedbb41080c57873e0382efe81f5475c 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
import Promise from "bluebird"; | |
Promise.try(() => axios.get(CAREPLAN_URL)) | |
.tap(response => console.log(CAREPLAN_URL, response)) | |
.then(response => response.data) | |
.then(data => this.ds.cloneWithRows(data)) | |
.then(dataSource => this.setState({dataSource})) | |
.catch(e => console.error("Getting careplan failed", CAREPLAN_URL, e) | |
; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment