In a previous article I wrote about how to start a React project using the state and effect hooks, this time we will see how to work with condition...
For further actions, you may consider blocking this person and/or reporting abuse
Particularly I'd avoid using ternary inside jsx. It scales very well and soon your components will be full of ternaries and the mess will be everywhere
What do you advise to use then ? Ternary is expression and inside jsx expressions are the only way to do condition
Btw don't tell me to create a function which do the condition, that's really dirty. Well coded the use of ternary does not turn your code a mess.
Note that this is only my opinion
I think if you reach the point of having a lot of ternaries or too much nested ternaries, maybe, that component should be split in multiple components because the original one becomes too complex.
But most of the time ternaries are not a problem IMO and you can use them without issues, most probably before you reach the point ternaries are a problem you have another problem and already split the component.