| ▲ | Jaygles 13 hours ago | |
I do want styles tightly coupled to my React components. The product I work on has tens of thousands of React components. I don't want to have to update some random CSS file to change one component's appearance. I've had to do this before and every time its a huge pain to not affect dozens of random other components. Other engineers encounter the same challenge and write poor CSS to deal with it. This compounds over time and becomes a huge mess. Having a robust design system that enables the composition of complicated UIs without the need for much customization is the way. | ||
| ▲ | jasonkester 7 hours ago | parent [-] | |
That’s the heart of the matter. Front end development got taken over by the Enterprise Java camp at some point, so now there is no html and css. There’s 10,000 components, and thus nothing that can be styled in a cascading way. All these arguments are just disconnects between that camp and the oldskool that still writes at least some html by hand. When I get sucked into react land for a gig, it starts making sense to just tell this particular div tag to have 2px of padding because the piece of code I’m typing is the only thing that’s ever going to emit it. Then I go back to my own stuff and lean on css to style my handful of reusable pieces. | ||