我有以下代码在我的异步函数结束后无法显示警报。
{
new BaseService().request(
serviceURL,
"POST",
headerParams,
bodyParams,
serverResponse => {
this.setState({ isLoading: true });
AuthenticationService.completeAuthentication(
serverResponse,
clientResponse => {
this.setState({ isLoading: false }); // THIS WORKS AND HIDES LOADER
alert("Authenticated Successfully!"); //THIS DOESN'T SHOW UP AN ALERT
},
error => {
alert(error);
}
);
}
)
}
有什么线索吗?