DEV Community

Discussion on: Anyone else intolerant of html inside javascript? yes i mean React

Collapse
 
dinsmoredesign profile image
Derek D • Edited

As primarily a Vue developer, I don't mind JSX. I see the appeal and in advanced components would actually prefer to not have my template so separated from the logic. However, I really don't want to use JSX with Vue, even though it supports it, because Vue gives so much power to the template with built in directives, I feel like JSX with it would be a step back in many cases.

However, what really turns me off about React is styling. React itself supports global styling and CSS Modules. Neither are anywhere close to as nice as just throwing "scoped" on your style tag in Vue and never worrying again about styling clashes. The problem is made even more evident with the multitude of styling solutions in 3rd party libraries. Vue solved this problem from day 1, why the React community is so fragmented in how to style their apps, I'm not sure. There's even a suggestion from @dan_abramov that's been sitting around for a year in the React GitHub issues to address this and after ~50 comments of people suggesting every CSS-in-JS solution under the sun, there's still no easy solution that just works like you'd expect CSS to.