3 ms·
simple != reliable What is so hard about writing CSS in JS?
by ggurgone 8y ago
simple != reliable
What is so hard about writing CSS in JS?
- yowlingcat 8y agoScoping. The way you style a large, complex application is going to be very different using CSS-In-JS vs pure CSS.
- Chyzwar 8y agoYes, it is going to be safer and much simpler.
- nullandvoid 8y agoI think you're missing the point you can do both? If you want to load a global stylesheet for common theming and then provide component level CSS in JS then that's absolutely fine and even suggested. Having dealt with many styling solutions in my time I find using styled components with the style mentioned is one of the greatest developer experiences I've had in many years. Being able to interpolate your react state within your css is just great and opens up the doors to massively simplify dynamic layouts which the state of which are much better represented in JS
- JustSomeNobody 8y agoI don’t understand, simple things do tend to be reliable.