2 ms·
Most modern frameworks can be AOT compiled in that sense - React, Vue, Riot - they load JS code only at runtime, but still use templates (VDOM, strings or anoth
by ricardobeat 7y ago
Most modern frameworks can be AOT compiled in that sense - React, Vue, Riot - they load JS code only at runtime, but still use templates (VDOM, strings or another representation) as blueprints to update/manipulate the DOM. AFAIK Angular still uses dirty checking; Angular Ivy, yet to be released, will move to something a little closer (incremental-dom), but still not the same.
What Svelte does is precompile the UI update code[1], changing text nodes, attributes, children, targeting DOM nodes directly. Think Prepack[2] vs DOM diffing.
[1] https://svelte.dev/repl/hello-world?version=3.16.7 https://svelte.dev/repl/hello-world?version=3.16.7
[2] https://prepack.io/ https://prepack.io/
- paulddraper 7y ago> Think Prepack Angular compiler is certainly an optimizing compiler. > Angular Ivy, yet to be released Ivy became an opt-in feature of the Angular CLI earlier this year with Angular v8. > AFAIK Angular still uses dirty checking Ivy uses "dirty checking" too [1]. AFAIK Ivy and pre-Ivy operate on similar fundamental principals, which is why Ivy is a drop-in replacement. [1] https://indepth.dev/what-every-front-end-developer-should-know-about-change-detection-in-angular-and-react/ https://indepth.dev/what-every-front-end-developer-should-kn...