Hacker News new | ask | show | jobs
by theturtle32 279 days ago
I feel this with every fiber of my being. I used to do a TON of front-end work, some of it quite cutting edge, delivering highly performant user experiences in the browser that had previously been only thought possible in a native app. Back in like 2009-2015. I was deeply connected with the web standards fundamentals and how to leverage them mostly directly.

I detoured into heavier focus on backend work for quite a while, concurrent with the rise of React, and watched its rise with suspicion because it seemed like such an inefficient way to do things. That, and JSX's limitations around everything having to be an expression made me want to gauge out my eyes.

Still, React pushed and laid the foundation for some really important paradigm shifts in terms of state management. The path from the old mental models around state to a unidirectional flow of immutable data... re-learning a totally new mental model was painful, but important.

Even though it's been chaotic at times, React has delivered a lot of value in terms of innovation and how we conceptualize web application architecture.

But today, when you compare it to something like SolidJS, it's really clear to see how Solid delivers basically all the same benefits, but in an architecture that's both simpler and more performant. And in a way that's much easier to organize and reason about than React. You still get JSX, server components, reactive state management (actually a MUCH better and cleaner foundation for that) and any React dev could move to Solid with fairly little mental re-wiring of the neural pathways. It doesn't require you to really change anything about how you think about application architecture and structure. It just basically does everything React does but better, faster, and with drastically smaller bundle sizes.

Yet I still have to begrudgingly use React in several contexts because of the industry-wide inertia, and I really wish I didn't have to.

4 comments

> It just basically does everything React does but better

SolidJS still has some major pain points; the one I found was not knowing whether a prop was a signal or needed to become one. The type system doesn't help much. In React, you know for sure that if your reference changes, the component reading that reference as a prop will re-render. In Solid, it's less clear whether the update will be observed.

> In React, you know for sure that if your reference changes, the component reading that reference as a prop will re-render.

Amen. Data flows down. That, to me, is one of React's biggest strengths.

Amen because of this we have useeffect and calling the whole component tree on a isloading change
isLoading should be a boolean; it will maintain referential equality across renders and not cause a re-render unless it is an actual edge from false to true or vice versa.
what? what does what you said have anything to do with what I said? how does "data flowing down" now related to the use effect dependency cycle? are you new to programming?
> Yet I still have to begrudgingly use React in several contexts because of the industry-wide inertia, and I really wish I didn't have to.

I think you'll find a lot of people begrudgingly have to work and really wish they didn't have to. That means using what they know, which means React. Which I totally get. People want to spend time with their kids, hobbies etc. Worst case, they might be caring for others, like their elderly parents.

I feel like you derailed the point made. It was not about having to work at all, but about what tools to work with.
Yeah, but having to learn new tools is more work than using the tools you already know. That's the point I'm making.
You don’t have to! I wonder what you think of this framework my company (mostly me) developed over the last decade, I am open sourcing it under MIT license: https://github.com/Qbix/Q.js
>You still get JSX

Give me S-expressions instead. How else am I supposed to prove to frontend developers that I didn't make those up

The frontend would be so much better if Eich had shipped scheme.

ES6 wouldn’t have been needed. CSS-in-JS would have become standard decades ago. HTML would have almost disappeared too because parsing s-expressions would have been native. JSON would never been invented either due to S-expr.

In short, everything about the modern web would have appeared decades sooner and been more consistent.

S-expressions is basically the much better version, that doesn't need a special interpreter/parser and doesn't reinvent the wheel.
Natural language has parentheses. Math notation has those and different kinds of brackets, too. But tell me, what language has closing tags? A language for parrots?

Only half joking, it's same principle as how indentation-based Python ate world, while languages with `begin` and `end` keywords like Ruby and Pascal are hardly to be seen these days