Skip to content

re: Svelte Needs A Virtual DOM VIEW POST


Both Svelte and React end up making the exact same number of changes to the DOM. Even for large data changes. The only difference is that react reconciles the changes by using the virtual DOM first. Svelte updates the DOM based on what was changed usinh the compile time knowledge of how to make said change. The only place react might be faster is adding a huge number of nodes in a very short time as it could decide to use something like innerHTML to get all the elements on screen and then hydrate them next tick. If you're adding 50+ nodes in a single cycle on a regular basis, then you probably have a problem. Even Facebook doesn't update that many things at once, why? Because it's bad practice and you should be focused on reacting to user interactions.

code of conduct - report abuse