News for hackers. Stuff that matters.
Re:Solid.js feels like what I always wanted React to be by hsn915 on Tuesday March 01, 2022 @12:37AM (#30510070)
This feels a lot like knockout.js but with a jsx syntax.
Re:Solid.js feels like what I always wanted React to be by drewrv on Tuesday March 01, 2022 @12:55AM (#30510182)
Knockout.js was/is wonderful, I'm not sure why it never took off the way angular or react did. I do appreciate jsx though so I'll be looking into Solid.
Re:Solid.js feels like what I always wanted React to be by hsn915 on Tuesday March 01, 2022 @06:42AM (#30512939)
As far as I could tell, around that time (and even now to some extent) the amount of activity on StackOverflow is used to measure the popularity of a project.

Angular had a "made by google" kind of logo on its website, indicating to many people that it's of high quality and worth adopting.

But Angular was also so convoluted and had so many problems that so many people kept running into random problems all the time and had to ask questions about them on SO. This signals (incorrectly) that Angular is popular, driving more people to believe it's worthwhile to adopt it.

Knockout had neither. It was not sponsored by a corporation. And it was so good that you hardly ever run into random problems.

Ultimately it was eclipsed by React and Typescript because lack of type checking for the html templates means it's hard to scale it will to large projects.

Re:Solid.js feels like what I always wanted React to be by leonardopainter on Tuesday March 01, 2022 @06:00AM (#30512575)
The problems with knockout were:

very hacky syntax embedded into html. Sometimes you had to even use some kind of comment notation because there was no entry point into the html to add data properties or whatever it had.

it was slow.

the observables weren't variables you could use like plain JavaScript variables

it has the same problem as React - state-based algorithms are not very good ways to solve problems (if (showDialog && !open && ranOnce). You have to keep creating more variables to represent more states instead of using normal programming language concepts, and then all of the observables ping around and become complicated.

Re:Solid.js feels like what I always wanted React to be by orenelbaum on Tuesday March 01, 2022 @01:17AM (#30510321)
It kinda is, but it's more than just JSX. Solid was basically born out of Knockout and is in many ways a continuation of Knockout, but it has some relatively significant changes and additions to make this approach more viable, especially for large long standing projects. JSX is more of a quality of life thing, you don't even have to use it, Solid's runtime exists completely separately of JSX and can work great without it or even potentially be integrated with other templating languages.