Look at the code provided:
const {
aForm,
bForm,
eForm,
qForm,
} = this.form;
return (
aForm.isEditing ||
bForm.isEditing ||
eForm.isEditing ||
qForm.isEditing
);
Can we optimize this in a different way? Perhaps something like this:
const forms = pick(this.form, [
"aForm",
"bForm",
"eForm",
"qForm",
]);
Object.values(forms).map(f => f.isEditing).join("||") //Need to return boolean value.