DEV Community

Discussion on: Cleaner React: Conditional Rendering

Collapse
 
sturdynut profile image
Matti Salokangas

I see what you are saying; you could very well use a switch operator as well. The concept here was to demonstrate how you can wrap RenderIf to create a richer API for your JSX.

Collapse
 
rtivital profile image
Vitaly Rtishchev

What I'm saying is that RenderIf is a huge mess and should not be used

Thread Thread
 
sturdynut profile image
Matti Salokangas • Edited

I've used it on several projects where teams were really happy with it. I'm curious why you think it is a "huge" mess considering the alternatives and potential pitfalls?