Closed Pushpi1992 closed 6 years ago
.then(function(success) {
this.setState({ ... }); // call self method
}.bind(this) // <== this
or
async checkIsLocation() {
let check = await LocationServicesDialogBox.checkLocationServicesIsEnabled({
message: "Use Location ?",
ok: "YES",
cancel: "NO",
}).catch(error => error);
this.setState({ ... }); // call self method
}
If i call another method inside a .then(success) then state is not changing because that method is not calling. Please tell me how to call any method from inside .then(success)