Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's more conceptual than keeping everything in one file. I want to be able to see everything related to a component without looking at anything else, and to be able to easily change its styling in the same way I change its structure or behavior (at least with React). You can technically do this by creating a separate CSS file for every component, but the problem is your CSS has no context about your component, and so you end up doing all kinds of shuffling with classes to get things to display the way you want them to. This is a much more elegant solution, in my opinion.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: