Created
February 26, 2019 14:58
-
-
Save BenjErgizerBunny/f4a839953b57ba8d8a94f7f2f08aa751 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
toScreenTwo = async () => { | |
const { isLoggedIn, user} = this.state; | |
try { | |
if (!isLoggedIn) { | |
const response = await http.post('/v1/signup/user', { | |
user, | |
}) | |
for (var value in response.data) { | |
await this.state.tableData2.push(value); | |
} | |
console.log('response', this.state.tableData2); | |
} | |
await this.setState({ | |
modalVisible: false, | |
friendsModalVisible: false | |
}); | |
} catch(err) { | |
console.log("error ", err); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just change your for loop to below :