|
|
|
|
|
by gmaster1440
4121 days ago
|
|
Good question. Intuitively, having inline styles over style sheets goes against common patterns involving maintainability of large code bases, ditching mixins, variables, and other helpful functions that preprocessors like Sass provide you with. The idea is that you gain extra maintainability points by co-locating your styling with your logic and DOM, a pervasive design patter in React in general. If I want to style a particular view, I no longer have to concern myself with which stylesheets contain styling for that view. I can simply go to the React Component where that view is owned, and see the styling for it right there. See also: - https://speakerdeck.com/vjeux/react-css-in-js - https://github.com/FormidableLabs/radium |
|
[1] https://github.com/jtangelder/sass-loader