DEV Community

Discussion on: React Beginner Question Thread ⚛

Collapse
 
camkida profile image
Camilo • Edited

React seems easier than Vue for conditional rendering in my opinion, in the end it's just javascript and you can do it in many different ways!

Collapse
 
rip21 profile image
Andrii Los

I completely agree with Camilo.

The main problem for me why Angular and Vue is quite meh is because you need to learn another domain specific language. So you need to know some gotchas here and there, some limitations etc. So at the end of the day, maybe ternaries starts to become cumbersome (than you probably need to decompose component to smaller pieces to abstract this away) but at least you surely 100% know how it works.

About make it more beautiful, you can use just shortcut like
{obj.attr && <Stuff/>}

Or just use some simple high-order-component, or decompose things and move this clutter to the component itself.