Re:Second-Guessing the Modern Web
by jakelazaroff on Thursday September 21, 2023 @10:37PM
(#37607213)
Not sure why this is getting downvotes. Ternaries are at best a necessary evil in JSX. We'll all be rejoicing when pattern matching finally lands in JS [1].
As soon as you need a 3rd leg you have to rewrite it as a full blown if/case/whatever anyway.