Live data from Hacker News

Solid – A declarative JavaScript library for building user interfaces

github.com

81–90 of 178 posts

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

#81
post #75

Earlier quoted context omitted.

If you’re “compiling all possible changes” that’s a diff, right? If there’s no VD, what’s being diffed?

the question is not what, but when

Exactly. Think of is as the classic compiled vs. interpreted languages debated. One is clearly faster than the other but the slower one may have different advantages.

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

#82
post #73
post #55

This (and similar libraries) is the way forward. I joined the Svelte camp a while ago so I'm unlikely to try Solid anytime soon, but had I started with it I wouldn't complain, because the value proposition is the same: an abstraction which is runtime-inexpensive both in terms of CPU usage and bundle size.

I think, the "3rd Age of JS" [1] of frontend libraries are running directly in the browser without a build step. Like in the beginning. ES modules in the browser paves the way. Svelte and Solid are actually the pinnacle of the "2nd age of JS". [1] https://www.swyx.io/writing/js-third-age/

I read that article a few weeks back. It's interesting. I see the desire to lessen on tooling but it is going to be hard to match what these libraries are doing purely runtime. I know people want to get there again. But I think we are more likely to see lighter dev methods and then when it comes to actual production the real advantages of compilation and bundling.

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

#83

Can this be used with things like mobx/mobx-state-tree? Absolutely having a blast with MST. Also, does lack of vdom mean a project like react-native could never really come from this?

It can be used with MST with a bit of interopt. As for native it's possible but would require different compiler output. I saw an approach with another library mind you that emulated DOM API over Native script and used the same compiled output for both. Probably not the best way but interesting.

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

#85
post #70

"Using JSDOM or similar we can run Solid on the server" Doesn't sound very promising tbh.

I've been working in this area. Solid now has string rendering on the server without DOM emulation. I'm just one person so I went with what was cheapest first.

Nice, thanks for the quick reply!

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

#87
post #35

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

Some people thought they must use VDOM to get things done efficiently, because "All those updates to the DOM will make the browser repaint and everything will be slows! Oh no! We must use VDOM!" This library apparently proves them all wrong, by using the normal DOM in a clever way.

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

#88

Is there dedicated DevTools support for Solid like there is for React, Vue, Svelte, and co.? If not, is there a convenient way to inspect state, props, and the component hierarchy?

There is an open issue for this. It's an area that needs work since I can't just repurpose existing tools like VDOM libraries do. The challenge that comes with pioneering an approach.

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

#89
post #85

Earlier quoted context omitted.

I've been working in this area. Solid now has string rendering on the server without DOM emulation. I'm just one person so I went with what was cheapest first.

Nice, thanks for the quick reply!

Warning performance there isn't stellar there yet but it is my current active area of research.

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

#90

Is there dedicated DevTools support for Solid like there is for React, Vue, Svelte, and co.? If not, is there a convenient way to inspect state, props, and the component hierarchy?

This seems like a silly issue. At one time there was no DevTool support for any of those other tools you mentioned.
Post reply on HN