4 ms·
CSS in JS is one place where Vue has a substantially better experience. Being able to toss scoped-css, written as normal in a css block is what I call nailing t
by bpicolo 8y ago
CSS in JS is one place where Vue has a substantially better experience. Being able to toss scoped-css, written as normal in a css block is what I call nailing the developer experience. It is all the best parts of css in js with none of the downsides.
- cageface 8y agoYou can do this with styled-components in react too. https://www.styled-components.com/ https://www.styled-components.com/
- preommr 8y agoYea, but this isn't out of the box. This is some 3rd party solution for a pretty major part of an application.
- apazzolini 8y agoI understand your preference for frameworks, but I actually appreciate that it's not out of the box. I'd rather have libraries focus on one thing and do it well - the Unix philosophy. This lets me compose the appropriate libraries for the problem at hand.
- iaml 8y agoYou are complaining about react's philosophy itself, which is they don't want to make any choices for you.
- FiddlyPack 8y agoAngular also does this, fwiw. Also allows you to manipulate the styles from DevTools which I hear is a problem in CSS-in-JS
- bpicolo 8y agodev tools works fine with both react and Vue if you set it up well, meaning to extract css to a file instead of throw it inline. Most setups extract to a file