Hacker News new | ask | show | jobs
by b_e_n_t_o_n 251 days ago
React also uses a declarative model, in fact React might be more declarative because it's still declarative at runtime, whereas Svelte et al. do a lot of static analysis to turn declarative UI into imperative targeted dom updates.
1 comments

Good point. I guess Svelte then takes advantage of both models; a declarative content change might by default result in a large update but the diff is ultimately the only thing that gets applied imperatively; I'm not sure how else React would do it though since the only natively-declarative browser technology is HTML and CSS; as soon as you touch JS, things start being imperative