Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://twitter.com/dan_abramov/status/1135424423668920326

Above thread summarizes the issue pretty well I think. Optimizing for DOM updates is nice, but you also want to optimize for bundle size and page load time, and at a certain app size the compiler output is always going to be bigger than just using a virtual DOM.



It is true that Svelte and React bundles will grow at different speeds as the app grows. Redundancy gets compressed in React library, but it just stays there in Svelte.

That said, since it is redundancy, I wonder if Svelte bundles are more gzippable (or at least, could be made so).


As far as I understand, in React, there is no redundancy to compress. You have one algorithm for diffing the virtual DOM and you're done. On a spectrum of biggest bundle size to smallest possible bundle size, the React model (more specifically Preact) would be as far to the right as you can go. Whereas any solution which does more specific compilation on individual operations to minimize DOM update work is going to have special code for each case.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: