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

4

u/sallystudios Feb 23 '20

One approach is to extract complex ternarys and conditionals into a function and return the components that need to be rendered. This keeps it modular