11 ms·
I'm a big fan of React, but I agree styling is a mess. CSS in JS has many limitations and virtually every alternative adds either another library or some other
by YCode 10y ago
I'm a big fan of React, but I agree styling is a mess.
CSS in JS has many limitations and virtually every alternative adds either another library or some other convention/configuration overhead.
Other frameworks struggle with this as well but it feels like React really shrugs off styling as the community's problem and subsequently there's a hodgepodge of solutions that work in this or that scenario but no gold standard.
- coltonv 10y agoI've been doing SPA's in react for a while and have had 0 problems whatsoever with styling. As long as you stick to good standards and naming conventions and use SASS or Stylus or something to keep things organized. What tends to give people so much trouble with styling?
- YCode 10y agoIt's not a huge issue, but that you have to use some third party library for styling in a view framework just seems inadequate. Other comparable libraries include styling into their philosophy, but React is irritatingly unopinionated about it.
- coltonv 10y agoIsn't that part of the React mantra? Everything is completely unopinionated except for rendering HTML based on data? Like it makes no opinion on how you should do state or HTTP requests as well as no opinion for styling, which is something I love since it avoids duplicating code or incompatibilities with standalone libraries.