Live data from Hacker News

Solidjs: Simple and performant reactivity for building user interfaces

solidjs.com

161–170 of 190 posts

Re: Solidjs: Simple and performant reactivity for building user interfaces

#161

Having used Solid on a largish web product for over a year, I am thoroughly convinced and will not be returning to React in the future. This is somewhat of an aside: I am aware that the creator of Solid has long been experimenting with adding laziness to the reactive system. I think it would be a mistake. That everything is immediate keeps state changes intuitive, fairly easy to debug, and is one of the strong points…

React is, I am convinced, the new Struts only client side.

Struts was SSR before we needed a term for SSR. It had low productivity so it looked like it was doing well in the industry because there were so goddamned many jobs. But if you asked people you really couldn’t find many that loved it, and if they did it was a sign that maybe their judgment wasn’t that great, and you were going to be disappointed if you asked follow-up questions about what else they thought was a good idea.

It was killed by JSTL, which was one of the first templating systems to get away from syntax.

Re: Solidjs: Simple and performant reactivity for building user interfaces

#162
post #30

Having used Solid on a largish web product for over a year, I am thoroughly convinced and will not be returning to React in the future. This is somewhat of an aside: I am aware that the creator of Solid has long been experimenting with adding laziness to the reactive system. I think it would be a mistake. That everything is immediate keeps state changes intuitive, fairly easy to debug, and is one of the strong points…

> Having used Solid on a largish web product for over a year I am curious about your experience in this regard. I've been aware of Solid for quite a while (and plenty of other non-React alternatives that on paper seem "nicer") but the problem I usually quickly run into after exceeding the complexity of a contrived demo app is the ecosystem not yet having a number of components, library wrappers, integrations, etc. th…

The SolidJS ecosystem is smaller but generally has more high quality libraries and more integrated.

Take a look at Solid Primitives: https://primitives.solidjs.community/

Re: Solidjs: Simple and performant reactivity for building user interfaces

#163
post #116

Earlier quoted context omitted.

With Svelte anyway, a third-party component just gets in the way. You just make whatever it is you want in HTML and make it reactive (put it in a file with the right extension and add the svelte-specific reactivity you want). It's simple/straightforward, does exactly what you want, and instead of spending time mastering the API of some component, you mostly spend time using the HTML/JS/CSS you already know.

Thanks. If that is the common approach in Svelte to third party components, than I learned something. > You just make whatever it is you want in HTML and make it reactive > ... instead of spending time mastering the API of some component, I am not sure if that would be a win. The API of the component is actually a selling point, because the component gets used in many different ways across the application. Possibly u…

The reason you don't see Svelte versions of common libraries as much as you do for React, is that with Svelte you can just use the vanilla js/html/css version and they work great. React has a hard time using vanilla approaches because the virtual dom and hooks aren't vanilla and don't work like vanilla. React is it's own world and therefore needs to have a React version of everything.

Re: Solidjs: Simple and performant reactivity for building user interfaces

#164
post #30

Earlier quoted context omitted.

> Having used Solid on a largish web product for over a year I am curious about your experience in this regard. I've been aware of Solid for quite a while (and plenty of other non-React alternatives that on paper seem "nicer") but the problem I usually quickly run into after exceeding the complexity of a contrived demo app is the ecosystem not yet having a number of components, library wrappers, integrations, etc. th…

The SolidJS ecosystem is smaller but generally has more high quality libraries and more integrated. Take a look at Solid Primitives: https://primitives.solidjs.community/

I've used Solid Primitives and white it's great, unfortunately it seems pretty dead. None of the primitives is "4 Accepted/Shipped" and many aren't even "3 Pre-shipping (final effort)".

Re: Solidjs: Simple and performant reactivity for building user interfaces

#165

Earlier quoted context omitted.

SolijS is just JS without much magic. It's simple, small and very fast. You can use signals and effects outside of components and it just works. You can even use a signal from the global scope within a component. Tracking of signals for effects and derived values is automatic. It looks very similar to React, but it's better in every way. Honestly the first time I'm happy with this kind of library. Don't need much mor…

Yes, Solid is very fast, but Svelte's Signals implementation seems to be even more performant. [0] I just loved the simplicity of using $: for deriveds and effects in Svelte 3 and 4. But after building a correlation matrix [1] and a work project with Svelte 5, I have to say that I really like it. [0] https://github.com/sveltejs/svelte/discussions/13277 [1] https://covary.xyz

To be fair by that metric Vue has the fastest now with its core built with Alien Signals. Raw reactivity benchmarks don't actually show very much because these systems are so fast that the quickest to the slowest reactive library doesn't even make a dent on a test that says render the DOM. And I say this as a benchmark enthusiast (and as that benchmark actually was crated by Milo from the SolidJS core team as part of our 2.0 research)

Re: Solidjs: Simple and performant reactivity for building user interfaces

#166

The annoying thing about solid coming from react is that every prop for every component needs to be a function that returns a value instead of just a value, otherwise that prop can never be updated.

That's not quite right! I made the same mistake in a Solid project. The deal is that your `props` parameter is reactive. If you use `props.x`, and the value of `x` later changes, that bit of your component will update. The catch is that you have to access it via `props` -- if you extract it, e.g. "const { x } = props", subsequent uses of `x` aren't reactive. Sometimes that's actually what you want, sometimes not. Lik…

Thank you for correcting this. I was going to come and respond when I saw this earlier but hadn't had a chance. Yes the annoying part is not being able to destructure but you definitely don't have to (and it isn't our recommendation) to pass accessor functions down as props. I wrote an article on our perspective here: https://dev.to/this-is-learning/thinking-locally-with-signal...

Re: Solidjs: Simple and performant reactivity for building user interfaces

#167
post #126

Earlier quoted context omitted.

We are using PrimeVue at my work and are very happy with it. I'm not super familiar with Mui so can't directly compare. https://primevue.org/

Thank you. I remember I had a look at that. Made a quick look now at PrimeVue treetable [0], to compare it to MUI datagrid [1]. There seems to be a wide gap in feature scope and depth. For example, column grouping in [0] seems to be not available (it is in PrimeVue datagrid, but that misses support for data hierarchy). ___ 0. https://primevue.org/treetable/ 1. https://mui.com/x/react-data-grid/features/

If you're interested in data grids specifically, Svelte has https://vincjo.fr/datatables/examples/client/hello-world

Re: Solidjs: Simple and performant reactivity for building user interfaces

#168
post #13

Portions of the react community are excited about how it's starting to feel more like PHP with the movement towards server actions in "client" code etc I personally don't like that direction so looking forward to exploring new frameworks. What I've generally liked about React/Next setups is that the code is generally explicit and less magic (I also have gripes with hooks feeling like magic). Things like Vue/Svelte wh…

One of my biggest gripes about this is that the wire format for React Server Components is neither standardized nor documented. Every bundler has its own format [1], but what this means in practice is that every bundler wants to be able to "move fast and break things" and treat the format as an internal implementation detail, which in turn means that there's no reference implementation and no way to have interop betw…

Sounds like you need a 14th bundled but built with some liveview code.

Re: Solidjs: Simple and performant reactivity for building user interfaces

#169

Earlier quoted context omitted.

Yes, Solid is very fast, but Svelte's Signals implementation seems to be even more performant. [0] I just loved the simplicity of using $: for deriveds and effects in Svelte 3 and 4. But after building a correlation matrix [1] and a work project with Svelte 5, I have to say that I really like it. [0] https://github.com/sveltejs/svelte/discussions/13277 [1] https://covary.xyz

To be fair by that metric Vue has the fastest now with its core built with Alien Signals. Raw reactivity benchmarks don't actually show very much because these systems are so fast that the quickest to the slowest reactive library doesn't even make a dent on a test that says render the DOM. And I say this as a benchmark enthusiast (and as that benchmark actually was crated by Milo from the SolidJS core team as part of…

That's good to know, thanks! Alien Signals is such a great name.

Re: Solidjs: Simple and performant reactivity for building user interfaces

#170
post #139

Earlier quoted context omitted.

I don't want to be obnoxious but can you link some that have the range of MUI? It would be nice to have options.

https://www.shadcn-svelte.com/ https://www.skeleton.dev/docs/get-started/introduction https://flowbite-svelte.com/ https://www.melt-ui.com/

Thank you! I have skimmed them, they look pretty and feel fast.

Unfortunately they seem not to match mui in breadth and depth.

Post reply on HN