3 ms·
> Copy and pasting CSS properties is cheap Why even bring that up? All 'CSS-in-JS' approaches have a way to reuse styles without having to resort of copy and p
by madeofpalk 9y ago
> Copy and pasting CSS properties is cheap
Why even bring that up? All 'CSS-in-JS' approaches have a way to reuse styles without having to resort of copy and paste.
- breeny592 9y agoThat's what got me with it - the author states as if it's fact that best practice for CSS-in-JS is copy and paste, but I've never seen anyone advocate for that. Especially with Webpack etc, it's trivial to just import JS styles and re-use. Sealed the fact to me that the author is biased towards CSS, without actually knowing anything about CSS-in-JS solutions.
- Wintamute 9y agoSee my new comment just above about DRY. Just because CSS-in-JS lets you re-use styles doesn't mean you should. Re-using styles is often an anti-pattern in large component systems.