DEV Community


Discussion on: Set CSS styles with javascript

karataev profile image
Eugene Karataev Author

I don't think you ever need to use insertRule in your day-to-day job unless you hit some performance bottleneck when working with styles.
I think optimizations with insertRule are useful for libraries (like styled-components), but add unnecessary complexity when developing regular websites or apps.