Sep 2021
20 Mon
21 Tue
22 Wed
23 Thu
24 Fri 12:00 PM – 02:35 PM IST
25 Sat
26 Sun
Sep 2021
20 Mon
21 Tue
22 Wed
23 Thu
24 Fri 12:00 PM – 02:35 PM IST
25 Sat
26 Sun
Amogh Sahasrabhojanee
We at Quintype have built a react framework which does isomorphic rendering. We also have a component library called Arrow which provides pre-styled customizable react components. For example some rows from here are being used here.
The problem:
On integrating Arrow components in our app, the pages were having quite poor web vitals. One of the reasons being the component CSS wasn’t being inlined during SSR
Solution:
Inline some of the CSS. We don’t know which components would be used above the fold at build time, since that can be customized from the CMS. However we do know this at runtime - the CMS sends it as a config. So we generated seperate CSS files for every library component, created seperate bundles for every row component in our app and changed the SSR logic to inline the styles of the 1st row component.
This isn’t really critical css but it improved our scores - CLS has become close to 0
Sep 2021
20 Mon
21 Tue
22 Wed
23 Thu
24 Fri 12:00 PM – 02:35 PM IST
25 Sat
26 Sun
Hosted by
{{ gettext('Login to leave a comment') }}
{{ gettext('Post a comment…') }}{{ errorMsg }}
{{ gettext('No comments posted yet') }}