r/reactjs • • Feb 23 '20

Needs Help Beginner requesting a code review and advice

[deleted] — view deleted post

45 Upvotes

25 comments sorted by

View all comments

Show parent comment

2

u/folkrav Feb 23 '20 edited Feb 24 '20

Nested ternaries come with a bunch of gotchas depending on the language and get very unreadable very quickly. They're usually very clever, and clever code is rarely good code.

They can be fine, they seldom end up being so.