Unlike React that ships with a virtual DOM that has to calculated and reconciled every time applications state change in the browser’s runtime. Svelte at compile-time keeps track of state that might change the DOM and wherever a piece of state changes it “surgically” updates the DOM using DOM API like
The lack of a virtual DOM is one of the more significant features of Svelte, this means svelte ships less code to the client. Also Svelte is a compiler so unlike React it doesn’t ship framework-specific API like this.setState or
In this article, we’ll look at how common features in React like state, props, components e.t.c are implemented in svelte.