Live data from Hacker News

Solid – A declarative JavaScript library for building user interfaces

github.com

61–70 of 178 posts

Re: Solid – A declarative JavaScript library for building user interfaces

#62
post #35

People loved React because of VirtualDOM. Now JS libraries advertise themselves based having no VirtualDOM. Can someone explain this to me?

> People loved React because of VirtualDOM.

I don't believe this is true.

VirtualDOM is a means to an end for React. People love that "end", but they do not love the means by which it is achieved.

Maybe one could argue that people love VirtualDOM because it allowed this "end" to be achieved, but I still think every React fan would much prefer it if was doable without VirtualDOM.

It is actually "doable" without vDOM but doing so would be much less scalable and require more care from the user of the library.

Re: Solid – A declarative JavaScript library for building user interfaces

#63
post #39

For the life of me, I can't understand why there is so much emphasis on the virtual-dom and dirty checking. DOM manipulation is expensive, so a check is made to see if it really needs to be done. If you're guaranteed to need an update, then this check is pointless. But this depends on what you're doing. Its really not something that's tied to the technical identity of any library. React, vue, etc, could probably also…

IME the Virtual DOM approach is not bad per se -- I appreciate that I can just instruct the library what final state I want and it figures out the details. It's just that for various reasons the algorithms used for "should we update this DOM node" don't scale well.

Of course, if everything was done perfectly I'd imagine an 80486 CPU should be able to render most of today's websites in 0.5 secs but... it's not done perfectly. :)

I like Svelte quite a lot, and I like the idea of the OP's library as well but I wouldn't count React dead just yet. It has a really good idea and the general ergonomics are there. But we shouldn't deny that it still has a room for improvement.

Re: Solid – A declarative JavaScript library for building user interfaces

#64
post #6

There is already a project named Solid led by Tim Berners-Lee: https://solid.mit.edu

This is interesting (I’m doing something similar in a specific domain) but there is a bunch of issues: very scarce documentation, funded by Quatari money, and more importantly built on bloated, low adoption set of Semantic Web specs. Heck, the tutorial even acknowledges[1] "If all the above looks terribly complicated: that’s because it is." [1] https://solidproject.org/for-developers/apps/first-app/4-dat...

Agree with the point about SemWeb. AFAIK, RDF/OWL/SPARQL is kindof a long-term pet project of TBL's, and now with SOLID IMHO he's kindof reusing parts of it as a 2nd chance to finally become mainstream (with weaving and creatively interpreting specs as is typical of SemWeb). What SOLID wants to achieve, though (a federated, less centralized web) is too important an initiative to let it become a case of puzzling out an utopian stack based on tech that has failed mainstream adoption, so unfortunately can't be taken seriously, and seems more like a project for fundraising TBL's pet project. Saying this as someone who has just recently worked with SPARQL and graph DBs in bioinformatics which is one of the domains where it actually has gained traction.

Re: Solid – A declarative JavaScript library for building user interfaces

#66
post #41

Earlier quoted context omitted.

VirtualDOM allowed you to update the dom with better performance than before. Is there now a better technique? Why is it better than VirtualDOM?

This is a good talk on the matter from the creator of Svelte himself, if you're interested: https://www.youtube.com/watch?v=AdNJ3fydeao Basically, it boils down to moving from tracking the DOM state in a VirtualDOM to tracking what DOM updates can happen at the compile stage and then just doing those exact updates to the DOM.

My annoyance with that talk is he never compared Svelte with multi-threaded React. It was the natural next thing to look at but it was like “okay my point stands let’s move on” haha.

Re: Solid – A declarative JavaScript library for building user interfaces

#68
post #61

HTML - A declarative markup language for building user interfaces. CSS - A declarative, domain-specific language for styling user interfaces.

Solid - A declarative JS library for building highly-interactive, logic-driven user interfaces.

Better?

Re: Solid – A declarative JavaScript library for building user interfaces

#69
post #35

People loved React because of VirtualDOM. Now JS libraries advertise themselves based having no VirtualDOM. Can someone explain this to me?

These compilers work like a library with virtual DOM, but compile it away before deploying.

So, in theory, you get VDOM goodness, without the bloat.

Post reply on HN