function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
User 444User 444 

which is better option to use cmp file of aura : 1aura: if or 2 normal if condition?

which is better option to use cmp file of aura : 1aura: if or 2 normal if condition?
Best Answer chosen by User 444
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

If you are writing in .CMP file it ie better to use Aura if only.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,

All Answers

Sai PraveenSai Praveen (Salesforce Developers) 
Hi ,

If you are using it to render it based on some logic it is better to use AURA IF condition. 

Are you asking of normal If condition from apex or js file?

Thanks,
 
User 444User 444
yes normal if condition suppose we can write like if(condition, true statement, false statement) in aura too right. I my case, I am displaying if something is null display this field else display other field.

In this case is aura:if or normal if is fine?
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

If you are writing in .CMP file it ie better to use Aura if only.

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,
This was selected as the best answer