DEV Community

Discussion on: CSS and JS Are at War, Here’s How to Stop It

Collapse
 
timkor profile image
Timkor • Edited

Good article. And a good point about social perspective. Although I do not really see this 'war'. But that's likely because I do not find myself in those social surroundings.

I like and use Vue. I use a lot of components but I won't use JS if it can be done with CSS. Simply for performance benefits. But that doesn't mean the HTML won't be rendered with JavaScript on build time or on server side rendering stage, even being hydrated on clientside. I think JS and CSS can work perfectly together.

Collapse
 
iskin profile image
Andrey Sitnik

Yeap, likely Vue has fewer conflicts about “CSS vs. JS”.

I think it is because they didn’t start CSS-in-JS movement with very aggressive ideas at the beginning (“you do not need CSS anymore”, etc).

BTW, I really like CSS implementation in Vue. It combines CSS syntax with the best part of CSS-in-JS (one file for the whole component with built-in selectors isolation).

Collapse
 
timkor profile image
Timkor • Edited

I think you are right about that. I like reading react articles though, a lot of concepts within the Vue ecosystem are and will be based on those of React. But I also think Vue does a better job of combining both CSS and JS. That also goes for UX, it got a place at both sides. At least that's how we look at it from within our company.

Furthermore, I think that because React is initially so JavaScript focussed, that it's much harder to think outside the box of JavaScript. Note that my knowledge of React is not that extensive.

That might also be the case for the 'CSS guys' you are talking about. They may not be able to think outside that box that easy.

This makes it hard to combine both. But that's my opinion and interpretation of this 'war'.

:)