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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi :D
I just wondered if using insertRule for performance or not and I found this article. Thanks !
But how it differ?
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 (likestyled-components
), but add unnecessary complexity when developing regular websites or apps.