|
|
|
|
|
by naiyt
3064 days ago
|
|
styled-components are actually really nice, so I don't think it's fair to say "styling is React's worst part". This seems like a more general criticism of React's agnosticism when it comes to so many things. React falls more heavily on the library spectrum than the framework one. It's rather un-opinionated about a lot of things: styling, state management, routing, code organization, etc. Definitely not something that's unique to styling. On the one hand this offers a lot of flexibility to do things the way you want, but also makes the learning curve a lot steeper. Honestly I would love for somebody to build a more full fledged framework around React that makes most of the decisions for you. A sort of "good for 90% of use cases" setup. (I guess create-react-app is sort of like that? You still have to make too many decisions, I think.) |
|
Most of the other parts of React are great with the freedom of choice. I can use a 3rd party component that handles it's state internally, or expects to be controlled externally, or uses or doesn't use JSX, or organizes it's code however it wants. But if I want to style it (which i'll need to do), I need them to support the method I'm using in my app, or have this very ugly and hard to support "bridge" between what I'm using and what they are using.
I'm not trying to be all doom-and-gloom, but it is a pain point for me, and it's not getting better in my experience, it's getting worse. It's not nearly bad enough to get me to switch away from React, but it's something I would like a nicer solution to.