4 ms·
> the [Svelte] user base is very small compared to the react world. In the end, we judged svelte too risky to depend on. So your custom framework user base is
by okareaman 5y ago
> the [Svelte] user base is very small compared to the react world. In the end, we judged svelte too risky to depend on.
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
- resonious 5y agoAre you criticizing Svelte because it's "not rocket science"? Would you be more inclined to use it if it was extremely complicated?
- okareaman 5y agoI guess I fell for the hype. When I looked at it I thought, is that all? I think simple is better. It simple enough that writing my own component compiler is a nice project to work on. I already started. I found out today that it will be easy to write the observer pattern because Google added requestIdleCallback in 2015, so in my idle loop I just check the message queue and see if any changes are posted so I can update the subscribers. The other thing about doing my own is I can do it in Dart instead of TypeScript. https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...
- lowwave 5y agothanks for the technical clarification. What's ur take on Solid js?
- okareaman 5y agoNow that I've looked at it I think it might be what I'm looking for. It's fast, reactive and composable. There are some really good comments about Solidjs in this thread and some others backing up what I'm saying about the virtual DOM https://news.ycombinator.com/item?id=29388296 https://news.ycombinator.com/item?id=29388296
- okareaman 5y agoYou're welcome but I'm sorry I'm not familiar with Solid.
- CitrusFruits 5y agoSolidjs is nice if you want something that's going to feel familiar to react users, but is a bit easier to wrap your head around. Also the main driver behind it and community all seem pretty positive/chill from what I've seen.
- klabb3 5y agoI'm currently looking at svelte for a desktop app, so I'm very curious. Is your harshest criticism that the author has taken more credit than deserved? That I can live with!
- okareaman 5y agoRich Harris has this "stick it to the man" attitude which I thoroughly enjoy. In his case "The Man" is React and Vue. He shows some back and forth between himself, Evan You and Dan Abramov in one of his videos. Evan You called it SvelteScript in not a good way. This is all part of the competitive fun. 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.
- fouc 5y agoIs it possible to have a fast reactive framework without virtual DOM?
- smrtinsert 5y agoEjs plus rx seems like a fun weekend challenge
- okareaman 5y agoSure! Use Vanilla JavaScript, TypeScript, jQuery but do some research first so it doesn't turn into spaghetti code. https://en.wikipedia.org/wiki/Data_binding https://en.wikipedia.org/wiki/Data_binding https://en.wikipedia.org/wiki/Observer_pattern https://en.wikipedia.org/wiki/Observer_pattern https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...
- CitrusFruits 5y agoThere's a bunch of them I'm sure, but solidjs is a really good example. It has syntax very familiar to react, but works differently under the hood.
- itsbits 5y ago> Now React is stuck with it's virtual DOM. But sure Richard, take the credit for being fast if you want. Would it be hard for React to remove VirtualDOM(if they don't believe), and maintain most of API?
- okareaman 5y agoDan Abramov is fairly responsive on Twitter. I'd ask him.
- ice_cold_etoh 5y agoDid you mean: preact
- CitrusFruits 5y agoPreact uses a virtual DOM still.
- ice_cold_etoh 5y agoOh my bad, totally mess this up. 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?
- itsbits 5y agomay be it's one of challenges for devs, who ever are interested to make React alternative with same API and dev experiance without VirtualDOM support.
- croes 5y agohttps://en.m.wikipedia.org/wiki/Egg_of_Columbus https://en.m.wikipedia.org/wiki/Egg_of_Columbus
- okareaman 5y agoNice. Yes I can see that.
- ovao 5y ago> I just don't think Svelte does that much. Not to be pithy, but I believe that was Rich’s intention.
- okareaman 5y agoI guess the tagline "Cybernetically enhanced web apps" is a joke I didn't get. The first sentence on Svelte.com is "Svelte is a radical new approach to building user interfaces" alrighty then!