5 ms·
Can you explain your rationale on the first point WRT render time being "waaaay too late"? If your app is rendered via JS, having the CSS loaded at runtime sho
by tobz 11y ago
Can you explain your rationale on the first point WRT render time being "waaaay too late"?
If your app is rendered via JS, having the CSS loaded at runtime should not matter: there's no markup to affect (repaint) and the CSS will be available before your React/etc components are rendered up.
- abritinthebay 11y ago> if your app is rendered by JS only if it's pure browser-side only. Which is fine I guess - at that point you've given up on rendering performance anyhow generally (especially in initial paint).
- izym 11y agoHow about server-side rendering?
- abritinthebay 11y agoWell that that point it's slower to paint with CSS-in-JS because the browser won't have the CSS until the very last thing (after asset load, after initial paint, after content load, then after script execution). Now you could extract the CSS with a build step... but at that point you've admitted the solution is poor (and/or you're not good at CSS) and are just mitigating it by producing real CSS by automation. That's fine, but it's no replacement for general good practice or domain knowledge.
- izym 11y agoDo you have any proof that it's slower or is it just an assumption?