by okareaman · 4y ago · 0 comments
So your custom framework user base is much bigger than Svelte's or is it just you and a couple people on your team?
Here are some actual criticisms I have of Svelte:
Rich Harris thinks it's fast because it doesn't use a virtual DOM. No, it's fast because V8 speed has increased dramatically since React found a virtual DOM necessary. Now React is stuck with it's virtual DOM. But sure Richard, take the credit for being fast if you want.
A command line tool to parse some text based .svelte files and assemble them into regular browser files is almost trivial, not rocket science. Adding hashes to the CSS identifiers to namespace is also not hard.
Data binding and reactive programming are part of the observer pattern in the Gang of Four book. Rich Harris invented some sugar reactive syntax, but more power to him. I just don't think Svelte does that much.
Edit: Rich not Richard
https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...
Would it be hard for React to remove VirtualDOM(if they don't believe), and maintain most of API?
But I think VDOM is pretty much the core idea of react so it just wouldn't make sense for them to get rid of it. And also with React 18 coming with features like automatic batched updates and suspense, I would imagine it would be pretty hard to do without VDOM maybe?
Not to be pithy, but I believe that was Rich’s intention.
My biggest beef with Rich Harris is that he doesn't credit Lars Bak and the small team at Google for doing incredible work speeding up V8. Google saw nodejs take off and realized they had to make V8 faster, so they put a lot of money into doing so. Unfortunately the virtual DOM took off before V8 got super fast. Look up "you don't need a virtual DOM" for confirmation.
I believe it's one of the reasons Microsoft threw in the towel and adopted Blink. If you can't beat 'em, join 'em.
Harris also doesn't give any credit to the reactive binding work that came before him. He acts like he used a spreadsheet and had the bright idea to make a website that way. I have a strong sense of fairness so I don't think a designer/dev working for newspapers should take the credit from the geniuses at Google who made it possible. I think it's quite possible that he doesn't know any computer science but he's a gifted amateur.
Im looking at Shadow DOM components myself, but it's quite possible I might use Svelte. It's a nice tool, but it's not the magic beans that solve all your problems like no one ever before.
https://en.wikipedia.org/wiki/Data_binding
https://en.wikipedia.org/wiki/Observer_pattern
https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...
It has syntax very familiar to react, but works differently under the hood.
There are some really good comments about Solidjs in this thread and some others backing up what I'm saying about the virtual DOM