Yassine Gherbi
Oct 21, 2023

--

Interesting perspective on conditional rendering in React! While the ternary and logical OR operators certainly have their merits, I don’t fully agree with labeling the “&&” operator as outdated. It has its own use-cases where it can be more readable or efficient. The ‘best’ approach often depends on the specific scenario, and sometimes “&&” can lead to cleaner code when only a true condition needs to be handled.

I’d love to see some real-world examples where the ternary or logical OR operators offer a clear advantage.

Each method has its pros and cons, and being versatile in using them can make one a more effective React developer.

--

--

Yassine Gherbi

I'm a freelance developer from The Netherlands💻 📧Contact & Social Media📎 Github: YassineGherbi Instagram: yassine.gherbi Mail: yassine@hexelnet.com