@zachleat’s avatar@zachleat’s Twitter Archive—№ 34,165

  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
    OpenGraph image for smashingmagazine.com/2022/01/web-frameworks-guide-part1/#bundle-sizeBundle 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.