In my JSX file, I have a function like this.
async isPresent () {
const res = await AsyncFunction();
if (res) {
return true;
}
return false;
}
and then using it in a conditional rendering as
{ this.isPresent() && <div> Content </div> }
But this always returns true.
How do I solve this?