What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-05 08:34:05
async await react stackoverflow
constructor() { // ... this.state = { returnData: null } } async componentDidMount() { const returnData = await this.Post(...); // Using await to get the result of async func this.setState({ returnData }); } async Post(body) { try{ co... Add solution