Just out of curiosity: do you really think that evaluation of a control-flow-like one-liner might turn into a bottleneck in a react app?
I mean, I'm agree that this approach might be error prone if one works with deeply nested & all-levels fully optional objects/arrays (which isn't the most common use case in the world by the way) but do you think it may anyhow affect the rendering performance?
I mean, it seems unlikely that someone would just accidentially stitch in all DOOM engine logic re-written & adapted for JS in-between the <If></If>, isn't it?
You don't have to take my word for this (even when I did this in the past, realized it was a mistake and stopped doing it), you can just google this "If" component approach. I'm not the only one that knows this isn't ideal because you're evaluating branches of logic even when you aren't actually going into them.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just out of curiosity: do you really think that evaluation of a control-flow-like one-liner might turn into a bottleneck in a react app?
I mean, I'm agree that this approach might be error prone if one works with deeply nested & all-levels fully optional objects/arrays (which isn't the most common use case in the world by the way) but do you think it may anyhow affect the rendering performance?
I mean, it seems unlikely that someone would just accidentially stitch in all DOOM engine logic re-written & adapted for JS in-between the
<If></If>, isn't it?You don't have to take my word for this (even when I did this in the past, realized it was a mistake and stopped doing it), you can just google this "If" component approach. I'm not the only one that knows this isn't ideal because you're evaluating branches of logic even when you aren't actually going into them.