July 19, 2019
Frameworks like React, on the other hand, use a common runtime layer that performs the state updates. What this means is that you have to bundle in React with your application (which means a non-trivial bundle size increase, especially for small apps).
Svelte seems quite interesting on its own, but it feels like a particularly good fit for a library. One of my projects boardgame.io, for example, is a library that manages state for turn-based games. It also comes with an integration for React, and bundles in some React components that developers can use.
In order for the library to be truly React agnostic, I’d either have to distribute different versions of these components, one for each popular UI framework, or go the Web Components route.