DEV Community

Discussion on: Cleaner React: Conditional Rendering

Collapse
 
sturdynut profile image
Matti Salokangas

That is really nice! I think the one caveat here is that it is harder to discern the code paths in your components since the condition is nested in your component vs physically part of your component tree. I find it easier to see using RenderIf or something similar which also makes it easier for me to see the various conditions I need to test.

Collapse
 
alexkhismatulin profile image
Alex Khismatulin

100% agreed, but that’s still an option