4 ms·
God this is horrible. It's ugly. Hard to read. Things are scattered all over the code. And where is my sass ?
by sametmax 9y ago
God this is horrible. It's ugly. Hard to read. Things are scattered all over the code. And where is my sass ?
- giantsloth 9y agoIt doesn't support sass, but it does support scss.
- allover 9y agoTo all intents and purposes, when people say Sass, they mean Scss.
- mottomotto 9y agoI much prefer putting the styles in a separate {componentName}.scss file, import'ing that into the component and using the Webpack Extract Text Plugin: https://github.com/webpack-contrib/extract-text-webpack-plugin https://github.com/webpack-contrib/extract-text-webpack-plug... I guess now you have two files per component but to me, it's well worth it.
- onenite 9y agoYou can work with two files per component if you must truly put the styling in another file. One of the boons of react is that you can create a set of reusable base components that can be built upon throughout your app. If you can code-split the app, lazy-loading components as needed, and if you can cache all of the static app anyway, why does it matter if the presentation is tied to the logic? The same can be said for vue.js. :) The two languages have many merits and they both make their own sacrifices. But they are ultimately two peas of a pod. Like Thor and Loki. But who is Thor and who is Loki? ;)