Live data from Hacker News

Performance-focused forks of styled-components

sanity.io

1–10 of 29 posts

Re: Performance-focused forks of styled-components

#7

Maybe CSS in JS was the wrong thing to begin with. Your developers were so preoccupied with whether they could, they didn't stop to think if they should.

It might seem like a terrible idea now. But when it was first introduced, a) people were still trying to get CSS and Components to work together, React having made components quite popular; and (b) React was actually usable, compared to the complete mess it's become now, especially after they introduced hooks.

I switched to web components for all my personal work.

Re: Performance-focused forks of styled-components

#9

Maybe CSS in JS was the wrong thing to begin with. Your developers were so preoccupied with whether they could, they didn't stop to think if they should.

I was about to say the same. Having lived mostly in Vue land, this quote felt astounding to me:

"The React team themselves have made it clear: runtime CSS injection will always be slower than statically extracted styles. They recommend using for static styles and inline styles for dynamic values. That's the future."

I thought this lesson was already widely learned since the jQuery days.

Post reply on HN