Live data from Hacker News

Does anybody like React?

jsx.lol

161–170 of 353 posts

Re: Does anybody like React?

#161
No, it is forced upon me when SaaS vendors only support Next.js/React as official way to extend their product.

It is gotten weird after Vercel's take over development, with all the "use whatever", which is getting out of hand.

Also the whole functional spaghetti is bonkers.

Re: Does anybody like React?

#162
post #124

Earlier quoted context omitted.

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= ;)

It is a massive difference. I do not like magic compilers. The JSX transform is trivial and not even necessary, just create a factory function and React.createElement becomes arguably more readable, just not HTML like.

Re: Does anybody like React?

#163

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.…

We are very far away from Angular 1.0 days, and not every single website needs JavaScript.

Re: Does anybody like React?

#164
I do. Reading React is an uniform experience across all the codebases. You know what state is, what an effect is, what a rendering function is and what it looks like. You also know where code smells are, there's a whole section of eslint rules dedicated to that. Compare to hand-rolled frameworks, where everything is all over the place, and you have to navigate tons of indirection to understand the brilliant intuition du jour by some developer who was bored and wanted to inject a spark of creativity in their code. Give me predictability, and keep creativity for hobby stuff that nobody has to read.

Re: Does anybody like React?

#165
post #37

Earlier quoted context omitted.

What about Angular 2+?

I tried Angular 2+ back in the day. I found it frustrating to learn as the API had changed between versions, and when searching for help you would come across a blog post/stackoverflow answer, start implementing it and realise it didn't work in the version of Angular your project was in. Frustrating. Tried React afterwards, this frustration didn't really exist and it was much easier to pick up.

The frustation is pretty much there under Vercel's stewardship, especially when React comes in the shape of Next.js.

It is apps or pages, which supports what, what new use cases is "use..." now for, ....

Re: Does anybody like React?

#166

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.…

As someone who went through that same journey, agreed.

Compared to previous paradigms, React lets you compose complexity and rich interactivity really, really well. Even for all its flaws.

Re: Does anybody like React?

#167
More than React, I'm interested in the question of how to best write UI through code, in general.

Even though I'm a fan of React, and use it for practically every web application I build, my biggest and most obvious issue has been that writing UIs through React doesn't feel as natural as, say, writing command line tools in Go, or live/realtime apps in Elixir.

Some languages just feel incredibly natural and frictionless for certain things, and nobody has really nailed UIs yet. Swift, JSX/HTML, Svelte, or whatever framework of the week: they all feel like they're working around the problem to some extent. Like at some point in the process, the designers of the language/framework had to compromise and implement some hacky/weird/painful syntax to satisfy project requirements.

UI's natural interface is visual, so tools like Figma can serve as an essential part of the solution, but nonetheless, I feel there's something missing. There must be a more intuitive way to represent the visual through code. The current solutions, although I find it hard to describe precisely, are always tantalizingly lacking in one way or another.

Re: Does anybody like React?

#169

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 is the worst JS framework except for all the others we've tried. > React has its tradeoffs, but we got here after a long slog of other things that don't work. I strongly believe it's because of trying to achieve the wrong goal with the wrong tool. So many websites could just be bare html pages and forms with just a sprinkle of JS for some interactivity, but they want to add JS for whatever reason. If you can…

Exactly, for most websites out there classical webserver rendering does the job pretty well. Even fancy animations can be taken care by pure CSS.

Re: Does anybody like React?

#170

Earlier quoted context omitted.

You might be interested in solid.js. To me, it's easier to work with than React. What I like about it is that the reactivity model is small enough that you can understand it, and even implement a basic version yourself. It also uses JSX, but since there's no virtual DOM, you can also write 100% JS, but, unlike React, you can do it without any special wrapper. So you don't need to use or write a `react-dnd`, just use…

I've tried solid and it's much nicer on small projects. How well does it scale though? Modern React is also 'more functional' (for some definition) but it comes at a cost of cumbersome and leaky abstractions. Classic React walked a fine line of being 'just reactive enough'. You could make code declarative and composable while still micromanaging certain lifecycle and data dependency decisions that can be critical for…

I've built quite complex applications (e.g. a spreadsheet app) using SolidJS as a base layer, and in that sense it scales really well. It's very easy to separate data management from the UI, so architecturally it scales well, and performance-wise we rarely had issues with it at all.

The biggest issue is in finding people to work with it. If you're hiring React developers over web developers, they will probably struggle more with SolidJS's differences from React, in part because they just look so similar that there's more to "unlearn". But most web developer (i.e. anyone who can understand beyond just the confines of their favourite framework) should find it relatively easy to understand what's going on.

Post reply on HN