Reactjs – React js state management if-else condition
What is difference in writing in two different ways below? function App(isTrue){ if(isTrue) return <ComponentA/> else return <ComponentB/> } // what is different if I write like this function App(isTrue){ return(<> {isTrue && <Component/>} {!isTrue && <ComopnentB/>} </> ) }