I have a react code as shown below which uses inline if with logic && operator in react:
{ schedules && <ListItem items={schedules}/> } // Line A
{ schedules==null && <h2>Hello World</h2>} // Line B
Line A prints list of schedules and Line B prints Hello World on the webpage if there are no schedules.
I am wondering how I can merge Line A and Line B.