Live data from Hacker News

Solid – A declarative JavaScript library for building user interfaces

github.com

41–50 of 178 posts

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

#41
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 it solved a problem. They just happened to solve it using virtual DOM. but theses next generation frameworks are showing that there's a better way to solve the same problem.

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

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

#42
post #38
post #35

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

VirtualDOM is more of an implementation detail IMO. What I love about React is for its declarative API and we can compose components easily.

I agree. I love that about React. I think all UI libraries could learn a ton from React.https://medium.com/@ryansolid/what-every-javascript-framewor...

But it isn't something that completely gets abstracted. There is a reason it has been so difficult to make a non-virtual Dom version of React. It isn't impossible, but has yet to fully flesh out despite attempts by a few projects including members of the React team.

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

#43
post #38

Earlier quoted context omitted.

VirtualDOM is more of an implementation detail IMO. What I love about React is for its declarative API and we can compose components easily.

I agree. I love that about React. I think all UI libraries could learn a ton from React. https://medium.com/@ryansolid/what-every-javascript-framewor... But it isn't something that completely gets abstracted. There is a reason it has been so difficult to make a non-virtual Dom version of React. It isn't impossible, but has yet to fully flesh out despite attempts by a few projects including members of the React team.

So React needs VirtualDOM? Do people want React not to be dependent on VirtualDOM. Is there a reason/benefit?

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

#44
post #41

Earlier quoted context omitted.

People loved React because it solved a problem. They just happened to solve it using virtual DOM. but theses next generation frameworks are showing that there's a better way to solve the same problem.

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

Sort of. I don't think you can write off the virtual Dom. But this is basically my area of research. I'm saying that a specific approach to reactive programming is more performant. I have an article for that too: https://medium.com/better-programming/the-fastest-way-to-ren...

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

#45
post #41

Earlier quoted context omitted.

People loved React because it solved a problem. They just happened to solve it using virtual DOM. but theses next generation frameworks are showing that there's a better way to solve the same problem.

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.

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

#46
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.

Thanks!

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

#47
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?

Sort of. I don't think you can write off the virtual Dom. But this is basically my area of research. I'm saying that a specific approach to reactive programming is more performant. I have an article for that too: https://medium.com/better-programming/the-fastest-way-to-ren...

Thanks. The whirlwind of changing benefits of various frameworks can be rather confusing. I do wonder how much this matters for most apps and at what cost of complexity it brings. But advancements in the field is a obvious good thing.

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

#48
I recently rewrote a small toy project from Preact to Solid. It went from spinning my fans and consuming over 25% of my cpu to practically idling. Solid is legit. I could have optimized my Preact, but I didn’t have to think of it with Solid. Same is true of Svelte.

Edit: I see the author is here, and lots of typically negative comments are being thrown at him. Ignore them and keep up the good work! We need people like you to push performance forward.

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

#49
post #41

Earlier quoted context omitted.

People loved React because it solved a problem. They just happened to solve it using virtual DOM. but theses next generation frameworks are showing that there's a better way to solve the same problem.

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

Perhaps faster than other framework implementations but there is no way it’s faster than the standard DOM methods.

https://stackoverflow.com/questions/21109361/why-is-reacts-c...

Post reply on HN