Live data from Hacker News

React is holding me hostage

emnudge.dev

271–280 of 553 posts

Re: React is holding me hostage

#271
post #73

Earlier quoted context omitted.

All blow up events come from a loud and extremely small minority. But whether they are making noise or signal, does not depend on number of people! React continues to dominate others because it meets baseline criteria for a js framework. And has corporate backing while Vue doesn't. Angular 1 was also popular because it was average js framework with google's backing before angular 2. Implying that React remains popula…

Vue is more akin to the old way of doing things with static templates (Jinja, Mustache, Erb, PHP), just with a dynamic twist. React is not perfect, it's bloated, but the reason it took off is that it brought something new to the table as a general and programmatic way to construct UIs. Being a child of Facebook helped it achieve dominance but considering that before React we had angular (shudder) and jquery, React's…

Not sure if you've worked with Vue 3's "composition API", but it is very different from Vue 2's "options API".

The composition API is bliss.

What's more important with Vue and fine-grained reactivity is that it is very forgiving of mistakes and poor practices that in React would cause much more significant side effects and performance issues.

Re: React is holding me hostage

#272

In case you're feeling alone. I detest hooks and I'm glad I was able to get out of front-end dev before they became wide-spread. I loved react at first with class components and its friendly lifecycle. It was designed to be understandable and self-documenting. It was a pleasure to write self-contained components. The move to function components, redux, and hooks stripped all of that away. I'm glad others have found v…

You say you detest hooks, but didn't elaborate why. Can you explain more? Is it just a preference for the class-based model of overriding lifecycle methods?

Re: React is holding me hostage

#273

Earlier quoted context omitted.

> All blow up events come from a loud and extremely small minority. But whether they are making noise or signal, does not depend on number of people! Fair, this instance is 100% noise imo. We're engineers - we should be able to judge when something is silly. > React continues to dominate others because it has corporate backing while Vue doesn't. And angular was popular for the same reason before angular 2. I have nev…

AngularJS and Angular (what you referred to as Angular 1 and 2) are completely different frameworks. It’s a branding issue, not a technical one. Angular, from version 2 to 15 in the past 8 years, has been completely backwards compatible, and even stayed on the same paradigms. Angular code from 8 years ago looks almost the same as modern code. Which is much more stable than react’s codebase.

AngularJS and Angular are really the same product. Angular 1 turned into Angular 2 turned into Angular 15. That’s far from different frameworks, even if in between versions you’re essentially learning a new framework.

Re: React is holding me hostage

#274

Earlier quoted context omitted.

> Surely people can find better use for their time and energy than churning through half-baked frameworks? We should have all stayed on backbone or Prototype.js with that logic. People look for alternatives because the status quo is awful (slow, verbose, footgunful). You’re saying “who needs cars when we got horses? Cars break down all the time”

No, when you mention js libraries you are already starting the clock way too late. The UI problem is not new. People were already building clunky UI cars long ago. MFC was introduced by Microsoft in 1992. Of course the emergence of the web platform and mobile/touch devices complicates the matter as you now have a proliferation of platforms to address (desktop native, desktop web, mobile native, mobile web) but my arg…

The NextSTEP/Cocoa family tree has lasted long enough to be interesting. No first-hand experience with it myself though.

Re: React is holding me hostage

#275

``` The quickest obstacle you’ll run into as someone new to React will be something like this function MyComponent() { const [num, setNumber] = useState(42); // infinite loop setNumber(n => n + 1); return {num} } Trying to make state updates at the top level of a component will result in an infinite loop. ``` I've taught React to dozens of people without ever seeing someone try this. A render function is an idempoten…

I like the mental picture of the comparison. Consider, that you might have taught a boased selection of people, and that others might not be so diligent to have read the docs and actually thought about it in depth to also understand it ; )

Re: React is holding me hostage

#276

I've been feeling the same sentiment as the author. Having worked on 3 sizable React projects now (all started before I arrived), I can only conclude that beyond a toy phase -- once you have many hands working on React and *particularly* once you start managing sizable state -- there is only pain. The most recent case resulted in spending quite a bit of time explaining to a peer why we were experiencing an unexpected…

Calling React the next IBM is giving React way more credit than it's worth. Sure, basic knowledge of React will land you a frontend dev job pretty much anywhere in the world. However most of that work will be maintenance. If anything React is the new PHP.

Bad analogy. PHP will remain relevant long after React is dead and just a bad memory of the past.

Re: React is holding me hostage

#278

Earlier quoted context omitted.

> Templates are a no go for me It’s pretty hard to get more “this is my opinion rather than a statement of objective fact” than this. > I do not like JSX. It’s not worth talking about why. It’s not an argument I want to have. Ok. Um… well, it’s hard to have a discussion if you won’t talk about it… …but, “code” templates allow autocomplete and type checking in a way that is an objectively distinctive superset of text…

JavaScript is a better, but JSX is not JavaScript. It reuses many features from JavaScript, but you still need some sort of translation (compilation) step to make it useful. In this sense it is not really fundamentally different from any of those what you call template languages. You can argue the fact JSX better integrates syntaxes from a proper programming language makes it better than other templating languages (a…

It is javascript.

That is literally the difference between JSX and most other template languages. Look it up.

The template syntax is converted to literally code and evaluated. The are just syntax sugar. How did you imagine the inline code works? The in-line function declarations?

Did someone invent a mini-subset of JS as DSL and a custom runtime…? Don’t be ridiculous. They did not. JSX is literally a thin wrapper around actual code.

Re: React is holding me hostage

#279

Earlier quoted context omitted.

I'm using React Native to build mobile games, and I am pleasantly surprised I can just write my own state management and update logic (hack around states and props) to walk around a lot of issues and get good performance.

If you hack around the state management and update logic, what is React bringing to the table? Just the cross platform widgets?

Those same workarounds could be still be multi-platform (Android and iOS) and if you’ve got any sort of complexity in your business logic you don’t need to implement and test it in JS/TS + Swift + Kotlin, just JS/TS

Re: React is holding me hostage

#280
post #50

Not to start an unholy flame war, but if you were to start a new project and didn’t need to worry about the ecosystem or workforce, what framework would you choose? Vue? Svelte? Something else?

Solid JS It will have a very easy learning curve for React users too.
Post reply on HN