Recently, I've been experimenting with a new-ish JavaScript framework called Svelte. You might be thinking: "ANOTHER JavaScript framework?! But I already use React/Vue/Angular, what could yet another framework possibly offer me?" Someone once said that frameworks are not tools for organizing your code, they are tools for organizing your mind. Let's take a look into how Svelte wants us to rearrange our heads, and maybe that will offer us some new ideas along the way.
Frameworks are not necessarily about the efficiency of the code they generate. Frameworks try to make the difficult easier, eliminate the repetitive, and try to reduce opportunities for mistakes. For us as developers, frameworks should also provide a design metaphor that makes sense and is consistent. We can see these benefits in React, for instance. React's use of the virtual DOM works to make managing DOM repaints easier, less repetitive as well as less error-prone. The virtual DOM pattern/technique/metaphor has become ver