formImageData = new FormData() let res = await axios.post有没有这样一种情况:variable = await resultFunction(); alert(variable)中的警报不会等待resultFunction(),因此警报请求会更快,并且”-but“将是undefined
我试图让我的应用程序在执行其他依赖于数据的代码之前等待承诺返回。为此,我使用的是then(),但它不像预期的那样工作,因为在返回值之前,下一段代码仍在执行中。我使用Express处理请求,Axios提出自己的请求。});bot.js: axios.get(BASE_URL + `guilds/return undefined; // This is not bein
over, make the request and then dispatch the res.data }}; Type 'Promise<{ type: ActionTypes.fetchUsers; payload: User[]; } | undefinedType '{ type: ActionTypes.fetchUsers; payloa