Live data from Hacker News

Ask HN: I can no longer like React, do you?

news.ycombinator.com

11–20 of 33 posts

Re: Ask HN: I can no longer like React, do you?

#12
IMO what has ruined React is the emergence of meta frameworks that are tied to vested interests of corresponding hosting platforms.

React docs themselves recommend starting with Next, Remix, or Gatsby. I can't imagine how Next or Remix is supposed to be a beginner friendly option. Imagine learning about state and JSX, and then now having to decide whether to use Next App Router or Pages router.

Devs should be able progressively _add_ stuff to a React app easily when they need it rather than having to make those decisions at the time of `npm init`

Re: Ask HN: I can no longer like React, do you?

#13
Nothing wrong with plain js. Now with Web Components, View Transition API, and Plain old Event + addEventHandler() you can do a lot.

You may want to consider HTMx and its hx-boost which is akin to Turbolinks if you've ever used that.

The addition of Hooks, HOC, Redux, etc. are for large teams, complex apps and/or varying skill levels.

Keep in mind plain js means no enforcement of standard patterns. This may cause problems with onboarding new devs and/or keeping the app manageable as complexity grows.

Also React and plain js are not mutually exclusive.

I also started around 2007ish, MooTools, jQuery, Backbone, Ember, Angular JS, Angular, React and now Nextjs. But for basic projects I usually start with plain js.

Re: Ask HN: I can no longer like React, do you?

#15
Never understood this posts. React as a whole and state management became many times easier over the years (been working with it, vue and a bit of angular for 6+ years now).

Function components removed stuff like getDerivedStateFromProps and many other things, introduced clear and simple way of component updating (as in "prop reference changed, I'm gonna render now").

For state we got redux toolkit, which simplified reducers, zustand and recoil/jotai and mobx which allow you to pick based on your needs instead of writing million reducers or passing state to children when you don't really need it.

Its not "react got hard", its people unable to adapt to changing world. Every mainstream framework in reality got streamlined, simpler and more effecient to create apps.

Re: Ask HN: I can no longer like React, do you?

#16
React is the Spring of frontend frameworks. If you have used Spring framework around 2010ish with Hibernate as ORM, you'd know what I am talking about.

React with its component ideas was a smart and the first of its kind, yes. But its evolution is regrettable. The idea of hooks is so.... that it would be considered spaghetti code in any other realm of software engineering.

I have switched to Svelte. I don't like everything about SvelteKit but it is better than NextJS and simpler to reason about with its page, layout load functions and error components.

With Svelte, I am rarely thinking about framework at all. I am thinking about my business domain.

EDIT: Fixed typos

Disclaimer: All opinions are subjective.

Re: Ask HN: I can no longer like React, do you?

#17
post #16

React is the Spring of frontend frameworks. If you have used Spring framework around 2010ish with Hibernate as ORM, you'd know what I am talking about. React with its component ideas was a smart and the first of its kind, yes. But its evolution is regrettable. The idea of hooks is so.... that it would be considered spaghetti code in any other realm of software engineering. I have switched to Svelte. I don't like ever…

I've been using Spring Boot since 2017 and haven't noticed any "evolution" that I would regret.

React on the other hand is insane. SolidJS is what react should've evolved in.

Re: Ask HN: I can no longer like React, do you?

#19
post #6
post #3

React is still the best IMO. It's crazy how much you cover with setState and useEffect alone, I barely use the other hooks. Combined with adjacent tooling and paradigms like JSX, React Native, Next.js, I find the others can't quite keep up with the React ecosystem. I had to use new Angular on a project recently, it's come a long way and it's actually not too bad especially with GPT-4 explaining the reasoning behind A…

I genuinely can't think of anything Angular does that I felt was strictly better than what React does. The closest is probably that Angular is batteries-included, whereas React is just a view library. This argument I would be more sympathetic with if those batteries did not include observables for (almost) everything. (I know about Signals. Not a fan of that either)

Observables are painful, especially when they should just be available Promises.

But Signals? That's just what everybody is converging on, hence making Angular no worse and no better than the competition in that regard.

Re: Ask HN: I can no longer like React, do you?

#20
post #10
post #6

Earlier quoted context omitted.

I genuinely can't think of anything Angular does that I felt was strictly better than what React does. The closest is probably that Angular is batteries-included, whereas React is just a view library. This argument I would be more sympathetic with if those batteries did not include observables for (almost) everything. (I know about Signals. Not a fan of that either)

The strange is, how long will it be just a view library. I‘m a beginner and was frustrated that the official react documentation advises to use next.js or some other react framework instead of vanilla react (because react is just a view library and you need routing, state management and other stuff anyway) First thing which came to my mind was „huh, angular was right“. And yes, vite and vanilla react is still possibl…

The main thing that next.js gives over React is a backend, something that Angular by itself doesn't give you.
Post reply on HN