Live data from Hacker News

Solid – A declarative JavaScript library for building user interfaces

github.com

1–10 of 178 posts

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

#3
Solid is another smart-compiler, virtual-dom-less frontend component building library.

If you're wondering how this is different from Svelte, the author has a Medium post on it[0].

[0]: https://medium.com/@ryansolid/javascript-ui-compilers-compar...

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

#4

Essentially react without virtual dom?

Syntaxually and philosophically. Implemention-wise it's more like MobX or Vue style reactivity without a Virtual DOM. It takes compiled reactivity past the localized component model of Svelte to new(ish.. the library has been around for a few years) heights in flexible templating with JSX and unparalleled performance.

The update cycle is the exact opposite to React Hooks. With React your Component needlessly re-renders over and over and your Hook dependencies explicitly whitelist change. With Solid your Comoponent is a basic function that executes once closing over state with it's Hooks, which are the only thing that run over and over as needed when state changes.

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

#7
post #6

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

That is an interesting project. And looks like they beat me to Solid name by a few years. I usually refer to my project as SolidJS. But thanks for bringing this to my attention.

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

#8
Can you use react components with it? All the libraries of beautiful components are the main reason why I use react. Like I know you can but with cross component comms and stuff.

Does the state thing have the same gotchas as react hooks? Not a big fan of how that's impl'd in react.

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

#10
post #8

Can you use react components with it? All the libraries of beautiful components are the main reason why I use react. Like I know you can but with cross component comms and stuff. Does the state thing have the same gotchas as react hooks? Not a big fan of how that's impl'd in react.

No Hook Rules. Hooks are an amazing feat by the React team as they basically come so close to emulating the behavior here with running through top-down VDOM reconciliation. But they can't be nested etc.. This reactive approach is similar to MobX or Vue Composition API and doesn't have those constraints.

That being said for the same reason. No React Compat. The library doesn't work even remotely similar. People have used them together, but this is no straight swap in.

Post reply on HN