Live data from Hacker News

Does anybody like React?

jsx.lol

121–130 of 353 posts

Re: Does anybody like React?

#121
post #38

As someone who lived through all major waves of JS for the last ~16 years, I do love react, in a sense: React is the worst JS framework except for all the others we've tried. I'd take React over the Angular 1 days any time. I'd take Angular 1's full-bodied MVC over the "build it yourself from scratch every time" approach of Backbone. I'd take Backbone's minimal MVC structure over the classic JQuery Soup architecture.…

Wait, react is a framework now? People used to say that react is just a model binding library. FYI I haven't used react.

you can use React like a library, but I have never really seen it done.

Re: Does anybody like React?

#122
React seemed like a bad idea when it came out, and a much worse idea once I started using it day to day. All of my personal projects use Svelte, and I finally, blessedly applied for a job recently where Svelte was their frontend framework of choice. htmx also felt great the one time I used it.

HTML, CSS and a scripting language inly for progressive enhancement are such beautiful, pure ideas, and learning frontend at the height of the web standards movement made me a partisan of using these technologies as intended. But these days, doing it that way feels like building a house with Japanese joinery techniques.

Re: Does anybody like React?

#123

As someone who lived through all major waves of JS for the last ~16 years, I do love react, in a sense: React is the worst JS framework except for all the others we've tried. I'd take React over the Angular 1 days any time. I'd take Angular 1's full-bodied MVC over the "build it yourself from scratch every time" approach of Backbone. I'd take Backbone's minimal MVC structure over the classic JQuery Soup architecture.…

React was a major improvement over Backbone + Marionette. Pre-jQuery was a shit-show as they hadn't even standardised the DOM.

Before that was XMLHttpRequest (particularly during my .Net WebForm days) and even had to use the ActiveXObject in IE that predated JSON.

Re: Does anybody like React?

#124
post #96

Earlier quoted context omitted.

Vue doesn't solve problems better than React (and solves them worse if you have to learn all their proprietary files and DSLs instead of JSX), so there's not much of a reason to switch. The real discussion would be between React's vdom and something like Solid's signals.

It does, if you care about ergonomics. The reactivity model is simpler and arguably less error prone. It does have its own templating syntax, which is trivial to learn. No more cumbersome to learn than JSX, which is a templating language designed by the React team. Not sure why you chose to make the distinction between JSX and Vue’s DSL as if JSX wasn’t developed for the sole purpose of facilitating React’s virtual D…

JSX is abc turns into createElement('div', null, 'abc') and you can use that instead of JSX if you like or you can use something like hyperscript. Everything else like mapping or if statements is pure JS and works just like JS anywhere else in your app.

Vue templates mean learning Vue's custom syntax for if statements, loops, dynamic attribute syntax (with its own gotcha), binding dot modifiers, data binding, and whatever else. It requires learning its entire custom directive system. It uses custom syntax for stuff like events too.

I don't see this as remotely comparable with Vue being much closer to something like my time working with Angular 1 (a time I'd rather not repeat).

Re: Does anybody like React?

#125
> Critical Security Vulnerability in React Server Components

RSC isn’t React.

> Next.js 15.1+ is unusable outside of Vercel

Next.js isn’t React.

By contrast to nextjs, React + Vite is quite a nice combo. Maybe Bun or Deno are also good? But nextjs and RSC should be kept separate from the discussion.

With React I find there is usually a clear and simple way to achieve what you want, and while it doesn’t perform super well, my customers get more value from a maintainable codebase than a fast one - because I can add features faster.

Re: Does anybody like React?

#126
post #113

Earlier quoted context omitted.

There are four culprits here and neither is due to JS. First is the pursuit of polish. Each extra 1% in polish adds tons and tons of lines of code. If you want that level of polish on a non-SPA, you'll still have to add all that code then reload it one page at a time. I see a lot of these "bare HTML pages" and they are lacking important stuff like i18n/a11y/WCAG compliance. Try adding all that back in and you'll see…

>I see a lot of these "bare HTML pages" and they are lacking important stuff like i18n/a11y/WCAG compliance. Try adding all that back in and you'll see your website bloat right up. having lots of JavaScript tends to make more WCAG problems, because you do interactive stuff that needs to be described. Having bare HTML and the accessibility that is required for that is not tending to bloat in my experience.

Users need interactive stuff. If your site isn't interactive and your competitor's site IS interactive, customers almost certainly will prefer your competitor.

When you try to chain that stuff across multiple backend-rendered pages, you get a whole other list of problems. If you need to track all the otherwise transient UI stuff on the BE, you have now created a whole mess of stateful APIs and turned horizontal scaling into a much bigger issue than it needed to be.

Re: Does anybody like React?

#127
I’m not an FE engineer but have found myself working very closely with the whole stack recently, which includes an SPA. We use html, JavaScript, Alpine for reactivity and Supabase realtime subscriptions.

It seems … okay? I feel like I can reason about it. But I worry I’m missing something that’s going to come back and bite us later because we haven’t adopted a framework.

Roast my stack?

Re: Does anybody like React?

#128
post #124

Earlier quoted context omitted.

It does, if you care about ergonomics. The reactivity model is simpler and arguably less error prone. It does have its own templating syntax, which is trivial to learn. No more cumbersome to learn than JSX, which is a templating language designed by the React team. Not sure why you chose to make the distinction between JSX and Vue’s DSL as if JSX wasn’t developed for the sole purpose of facilitating React’s virtual D…

JSX is abc turns into createElement('div', null, 'abc') and you can use that instead of JSX if you like or you can use something like hyperscript. Everything else like mapping or if statements is pure JS and works just like JS anywhere else in your app. Vue templates mean learning Vue's custom syntax for if statements, loops, dynamic attribute syntax (with its own gotcha), binding dot modifiers, data binding, and wha…

Vue supports JSX, though to be fair, it’s not idiomatic and hence never shows up in any docs.

Re: Does anybody like React?

#129
post #124

Earlier quoted context omitted.

It does, if you care about ergonomics. The reactivity model is simpler and arguably less error prone. It does have its own templating syntax, which is trivial to learn. No more cumbersome to learn than JSX, which is a templating language designed by the React team. Not sure why you chose to make the distinction between JSX and Vue’s DSL as if JSX wasn’t developed for the sole purpose of facilitating React’s virtual D…

JSX is abc turns into createElement('div', null, 'abc') and you can use that instead of JSX if you like or you can use something like hyperscript. Everything else like mapping or if statements is pure JS and works just like JS anywhere else in your app. Vue templates mean learning Vue's custom syntax for if statements, loops, dynamic attribute syntax (with its own gotcha), binding dot modifiers, data binding, and wha…

It’s a distinction without a difference. Both need to be transpiled, what happens under the hood is of little concern to anyone.

Please explain React’s reactive data binding since it’s apparently much simpler than v-model=

;)

Re: Does anybody like React?

#130

> Critical Security Vulnerability in React Server Components RSC isn’t React. > Next.js 15.1+ is unusable outside of Vercel Next.js isn’t React. By contrast to nextjs, React + Vite is quite a nice combo. Maybe Bun or Deno are also good? But nextjs and RSC should be kept separate from the discussion. With React I find there is usually a clear and simple way to achieve what you want, and while it doesn’t perform super…

why is RSC not considered react? it is designed by core React team, and heavily recommended by core React team. and needs deep support from react.
Post reply on HN