Hacker News new | ask | show | jobs
by sametmax 3147 days ago
God this is horrible. It's ugly. Hard to read. Things are scattered all over the code. And where is my sass ?
2 comments

I 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-plug...

I guess now you have two files per component but to me, it's well worth it.

You 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? ;)

It doesn't support sass, but it does support scss.
To all intents and purposes, when people say Sass, they mean Scss.