$.post('/api/settings/exicution', data, (result) => {
$("#errorBox").hide();
$("#successBox").show();
this.setState({
isSavedInDB: true
});
}).fail((response) => {
console.log('error ' + error);
$("#errorBox").show();
$("#successBox").hide();
this.setState({
isSavedInDB: false
});
});
console.log(this.state.isSavedInDB);
if(this.state.isSavedInDB) {
showconfrim("Do you want to add more Projects ?",e => this.addNewProject());
}
i am trying to update isSavedInDB
value inside success response of ajax call. but it is not update inside the success block and error block.
so can any ane help me on this.
i have decleared isSavedInDB
in side my constructor
state
block