Re:React v18.0
by tunesmith on Tuesday March 29, 2022 @05:52PM
(#30848859)
I'm wondering how switching from a css-in-js library to <link> + inline styles would impact CLS. With css-in-js we have some built-in CLS protection in that I think it blocks the JS until the CSS is present, by definition. At the least, it sounds like <link> + inline styles would take more analysis effort to determine what the critical css is for any component.
[ Parent
| on HN ]
Re:React v18.0
by madeofpalk on Tuesday March 29, 2022 @07:57PM
(#30849890)
CSS-in-JS and external <link> style sheets are not mutually exclusive.
There are a few toolkits out there that let you write component-oriented CSS-in-JS, but during build will extract everything to static external style sheets.