I am using ReactJs. I have two Components,PrescriptionIndex and PrescriptionNew, integrating one with another.
This is my first component \'PrescriptionNew\'
Your code is currently
if (X)
return A
else
return B
return C
Of course C
is unreachable here. I think you meant to drop the else case (B
) where you currently are returning null
, and return C
instead of it.
if (this.props.prescriptions.prescriptions !== undefined) {
return this.props.prescriptions.prescriptions.map(function(data){
return (
);
});
} else {
// return null; <== remove this
return (
)
}