logoalt Hacker News

mightyhamtoday at 12:24 AM8 repliesview on HN

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 of Solid's design. I've never run into a real world scenario where delaying computations seemed like an optimal way of solving a given problem.


Replies

zamalektoday at 3:27 AM

React has lived long enough to become the villain, and it's way too entrenched. It was certainly a very important step forwards in webdev, but it now probably has more gotchas than vanilla JS does.

show 1 reply
ryansolidtoday at 7:38 AM

I'm curious which part of laziness are you concerned with? Is it delayed execution in events? It is just most lazy things run almost immediately during creation anyway, and on update everything is scheduled anyway. The only lazy thing we are looking at is memo's which while impactful isn't that different as the creation code runs. I guess the push/pull propagation is harder to follow on update then simple multi queue but in complex cases we'd have a bunch of queue recursion that wasn't simple either.

mpalmertoday at 1:37 AM

> I've never run into a real world scenario where delaying computations seemed like an optimal way of solving a given problem.

And even when it might be, Solid has always exposed fairly low level reactive primitives for those who want more control. Hopefully if laziness is added, it's in the form of new optional primitives.

dkhtoday at 2:50 AM

> 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. that I use all the time.

Have you found the Solid ecosystem sufficient for whatever your needs are, is it fundamentally easier with Solid to integrate things that don't exist yet, or did you go into it less spoiled/tainted as I by reliance on React's ecosystem?

show 2 replies
mathtoday at 5:52 AM

I'm using SolidJS for Infumap (https://github.com/infumap/infumap), which is getting pretty big.

Two main comments that come to mind:

Because the state -> DOM mapping is non-trivial for my application, I ended up writing my own virtual DOM diffing code, a primary facet of React. I appreciate the ease of being able to circumvent this where it's not necessary and performance considerations dominate, though I admit i've not felt the need to do it anywhere yet.

The AI training data set for React is much larger. The models seem to do fine with SolidJS, though I suspect there is meaningful benefit to using React from this point of view.

Overall, I'm happy with where I'm at and I prefer the SolidJS way of thinking, though if I were to do it all over again, I'd probably just go with React for the above two reasons.

show 1 reply
steve_adams_86today at 6:14 AM

Is laziness intended to offer primitives for suspended UIs?

I haven’t used Solid for a while and can’t recall if there’s a Suspense counterpart already. If not, this seems like a reasonable feature to add. It’s a familiar and pretty intuitive convention

sveinnthorarinstoday at 12:20 PM

[dead]

sensiblecarrot7today at 5:40 AM

It's extremely frustrating these days when someone makes any claims about sizes/scale without providing actual numbers.

Your "largish" could be 10000 daily active users, which is my medium, and small for someone else.

Or maybe your "largish" is 1000000 for a site with mostly static, cachable parts, but the the same people were to build the same thing for a different audience that require a lot of interactivity and things that are different to say they wouldn't make the same claims.

What are you doing and what is the HN community doing.

Sure, React has its own problems and I choose not to use it outside of my job now. But if you're to convince someone else that something is worth switching to in terms of TECHNOLOGY, we need more than feels, vibes, and anecdotes.

It's not that I think you're right or wrong. However, if you are going to go out of your way to make a technical comment to make the world better place (I hope that's what you want to do), it requires more than a 2007 effort for people who care enough to make a difference now: otherwise you're just another person defending what they like most without any real data.

Don't forget that anyone who has any real experience as a software engineer knows that every day is about making trade-offs. Think deeply about what why I say this and what this means. If you don't know why, I hope you will find out or you will stop sprouting cult-like nonsense until you know why.

show 1 reply