I have something like this,
<div label="Account Information">
if ((editAccount === false )&& (changePassword === false) )
{<AccountInformation></AccountInformation>}
else if((editAccount === false) && (changePassword === true))
{<ChangePassword></ChangePassword>}
else{""}
</div>
Now I want to render the component interms of the following condition, but I am not able to do this. Why if else does not work here?
I also tried using conditional rendering using logical operator but in my case, I have to check two values, editAccount and changePassword.
How would I do that?
Aucun commentaire:
Enregistrer un commentaire