by nojvek · 7y ago · 0 comments
The framework that has blown me away with it’s simplicity and elegance but power is snabbdom.
It’s small, it’s fast, it’s modular. You can use it with jsx, you can use it with webcomponents if you want. You can type it with typescript. Animations check, custom module extensions, check.
As the recent experiments in wasm has shown, you can make extremely fast vdom diffing that is memory allocator friendly.
So my bet in the future is this. Vdom will be here for a while. It’s simple, elegant and we’ll figure out how to make it faster with newer tricks.
More non web UI frameworks will use similar approaches. React Native is paving wave here but I can see desktop apps and terminal apps embrace the same concepts too.
View as function of state is a very powerful paradigm. State being a simple dumb old nested object. No magic tricks.
Svelte feels too magical. Vue has same issues. It’s hard to reason with magic when you hit edge cases.
You ideally want a simple model in your head so you can build really complex apps by connecting simple axioms of logic.
https://svelte.dev/examples#dom-events Look at the compiled output (the "JS output" tab), it's so readable and stepping through it with a debugger is actually possible for mortals unlike trying to step through code using react (I know, I've had to do it..).