Created
August 29, 2018 21:53
-
-
Save fdjones/3b827f627c05a29df0d6c1d00186fc3c 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
async handleClick() { | |
try { | |
const res = await axios.get( | |
"https://em1p285uhk.execute-api.us-east-2.amazonaws.com/default/BloodyLambda" | |
); | |
this.setState({ | |
firstName: res.data.firstName, | |
lastName: res.data.lastName | |
}); | |
} catch (err) { | |
console.log(`Error: ${err}`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment