In Angular or Vue, you can render components conditionally using directives like ngIf and v-if. But in React there is no concept of directives, you have to render components using below syntax return (
<>
{loading ? <></> : <EmployeeList/>} logged in.
</>
);
} However if you have nested…