zachleat’s avatarzachleat’s Twitter Archive—№ 41,667

  1. React (and React based frameworks) have an uphill performance battle. A gem from @nomsternom on @smashingmag. smashingmagazine.com/2022/01/web-frameworks-guide-part1/#bundle-size
    Bundle Size

When looking at bundle size, I like looking at the minified non-Gzip’d size. That’s the size that is the most relevant to the CPU cost of JavaScript execution.

    ReactDOM is about 120 KB.
    SolidJS is about 18 KB.
    Lit is about 16 KB.
    Svelte is about 2 KB, but the size of the generated code varies.

It seems that today’s frameworks are doing a better job than React of keeping the bundle size small. The virtual DOM requires a lot of JavaScript.