0
0
mgmajid ghasemi
The code is checking to see if the retJson object has any key-value pairs. If it does not, the state of the app is set to {isEditing:false} and the app returns. If the retJson object does have key-value pairs, the code retrieves the first key from the Object.keys(retJson) list and sets the state of the app to {thatKey:value}; then it returns.
if (Object.keys(retJson).length == 0) {
this.setState(
{
//isEditing: false
}
);
return;
}