Live data from Hacker News

React Labs: What We've Been Working On – February 2024

react.dev

71–80 of 130 posts

Re: React Labs: What We've Been Working On – February 2024

#71
post #17
post #7

Earlier quoted context omitted.

What's the connection? Also, take a look at this response from 2021: "Like I said earlier, it was always the intention that we're not going to be able to work on it full-time... [I]t was intentionally designed for this kind of sporadic development. We would get critical fixes out as soon as posible, but overall, starting with 2.0, it's mostly in maintenance mode and does not strive to be the best tool for production…

A new solution could replace some of the tools we use today, making it obsolete and not worth maintaining in the future. Make sense, but the lack of an "oficial" solution doesn't help https://react.dev/learn/start-a-new-react-project

I have been tempted to go back to turn of the century tech: html tables for layout with inline css for styling and smarty template for separation of concerns all driven by php.

Re: React Labs: What We've Been Working On – February 2024

#72
post #21
post #20

Can anyone clarify how the compiler would fit into the workflow? Are we talking some kind of CLI that takes a JSX/TSX entry point as input and outputs a compiled JS bundle, like a replacement for Webpack/Rollup etc. but more specialised to optimise React code? Or something more fine-grained that operates on a single component/module at a time? Or something else?

The idea is that it should eliminate the need for things like useMemo, useCallback, etc. it seems there’s better support for promises, as well.

Thanks but this isn’t what I asked about.

Re: React Labs: What We've Been Working On – February 2024

#73

The goal behind "hooks" was to make React simpler for beginners. I build client-side apps since 2007, and React is getting too magical and complex for even for me. The NextJS influence is really making things worse, "use server" "use client" tags do not scale at all. The project clearly lacks mission, goal, leadership and direction. I'll use Preact in the next projects.

> The goal behind "hooks" was to make React simpler for beginners

No, it had nothing to do with making it "simpler for beginners." It was to functionalize state changes in a way that was impossible with classes and other OOP constructs like mixins. There is actually a great issue thread on the Flutter GitHub that explains exactly why other solutions do not work correctly when compared to hooks [0]. What people don't get about hooks is that they are an abstraction over state and app lifecycle changes. It is better to think of them as akin to closures but over lifecycles, not just holding state as closures do.

[0] https://github.com/flutter/flutter/issues/51752

Re: React Labs: What We've Been Working On – February 2024

#74
post #38
post #22

MobX and chill. No compiler necessary. If React created better extension points for pluggable reactivity we wouldn't even need observer() wrappers. This is all getting kinda bonkers.

MobX re-introduces all push-reactivity problems that React removes.

It can do it but not necessarily. I think in strict mode only actions can modify state and if you use reactivity only for rendering then it great

Re: React Labs: What We've Been Working On – February 2024

#75

The goal behind "hooks" was to make React simpler for beginners. I build client-side apps since 2007, and React is getting too magical and complex for even for me. The NextJS influence is really making things worse, "use server" "use client" tags do not scale at all. The project clearly lacks mission, goal, leadership and direction. I'll use Preact in the next projects.

> The goal behind "hooks" was to make React simpler for beginners.

What makes you think this was the goal? React team has been trying to get rid of 'this' for a long time; I believe I saw someone say that it had some undesirable consequences for the fiber architecture and for the "concurrent mode" that eventually was transformed into a set of concurrent features. Alternatively, it is possible that they wanted a better reactivity model than the one based on component's lifecycle. Why does this necessarily have to be simpler for beginners?

Re: React Labs: What We've Been Working On – February 2024

#76

The goal behind "hooks" was to make React simpler for beginners. I build client-side apps since 2007, and React is getting too magical and complex for even for me. The NextJS influence is really making things worse, "use server" "use client" tags do not scale at all. The project clearly lacks mission, goal, leadership and direction. I'll use Preact in the next projects.

I've seen this criticism several times on HN, but have never been able to relate to it. I've been using hooks since they were introduced, in several teams (at several different companies), and I've never experienced them being complicated to understand, either for myself, or for team mates - even juniors who are new to React. In my experience, it takes very little time ( I wonder if it's the case that many people on…

I can objectively prove that React devs themselves have at the very least changed how they understand hooks but more likely have been making it up as they’ve gone along. The best example is one of the more problematic hooks, useEffect.

Here’s how useEffect is described in the old documentation:

https://legacy.reactjs.org/docs/hooks-effect.html

> The Effect Hook lets you perform side effects in function components

Here’s how the new docs explain useEffect:

> useEffect is a React Hook that lets you synchronize a component with an external system.

These are dramatically different claims about what useEffect is supposed to be for. Dig a little deeper and Reaft developers will now explicitly tell you to not use useEffects for side effects, which again is the opposite of what they explained it to be.

The same change in how they’re actually supposed to be used has been true across all the books to a lesser or greater degree.

Maybe React has finally stabilized and it’s easier for new devs because they’re learning the more stabilized version. However, I suspect it’s easy because they just happen to be within the same cycle of understanding in React. Much like how React was easy for devs coming to it nearly a decade ago, until the devs changed everything about it. New devs may just not be deep enough into the new cycle to experience the pain of all your understanding being wrong.

Now, to be completely clear, I have no problem with the changes. I think change is good and I have successfully worked with languages where the change has been even more dramatic than React.

The difference with React, I’ve increasingly come to realize, is that the developers will make radical changes in how they understand it to work, while still gaslighting you that nothing really has changed.

Hence the massive effort they made to convince everyone that hooks were just a different approach as classes and they both would be first class citizens forever, when they first introduced hooks, only to subtly and quietly change the narrative to hooks being the future of Reaft and recommending hooks.

They make these shifts all over the place without ever announcing it and convincing you to believe that what they’re saying today has always been the case.

More honesty towards how they’re changing React and what those changes mean would have gone a long way to reduce the absolute confusion floating around the react world.

Re: React Labs: What We've Been Working On – February 2024

#77
post #22

MobX and chill. No compiler necessary. If React created better extension points for pluggable reactivity we wouldn't even need observer() wrappers. This is all getting kinda bonkers.

MobX is how you get spaghetti code and state changes everywhere. That is why we (our company) moved away from the observer pattern that MobX and RxJS use.

Re: React Labs: What We've Been Working On – February 2024

#78

The goal behind "hooks" was to make React simpler for beginners. I build client-side apps since 2007, and React is getting too magical and complex for even for me. The NextJS influence is really making things worse, "use server" "use client" tags do not scale at all. The project clearly lacks mission, goal, leadership and direction. I'll use Preact in the next projects.

I have made hard decisions to fully return to vuejs for a few months, much simpler.React has lost itself totally thanks to vercel/next.js who hijacked oss projects for its short gain with VC's money.

Re: React Labs: What We've Been Working On – February 2024

#79

The goal behind "hooks" was to make React simpler for beginners. I build client-side apps since 2007, and React is getting too magical and complex for even for me. The NextJS influence is really making things worse, "use server" "use client" tags do not scale at all. The project clearly lacks mission, goal, leadership and direction. I'll use Preact in the next projects.

I have a similar experience to yours. I'm using preact for most things now, sveltekit for anything full-stack or when I need static generation (great fro small/mid-sized projects, haven't build anything "enterprise" with it). I wish Remix was preact. It looks like it has parts of preact and svelte I really enjoy. I've been using Next.js since 2016/17 at small and large SaaS scale) -- I feel like they're building it l…

I haven’t done serious front end work since years, so I’m not up to date with recent solutions. The current project I contribute to has a Next.js app for its front end. The web app has maybe 4-5 pages, only one is pretty heavy (a sort of IDE like web UI). I’ve never experienced such a sluggish tool. next dev consumes a massive amount of memory and is really slow, next build takes minutes to compile pages… I’m pretty happy I’m not touching the front end regularly, I’ve mostly noticed the slow build times when creating a docker image (it takes ~10min to build in a CI context, most of that time is waiting for pnpm install and next build to finish) and setting up some continuous deployment pipelines.

I really feel bad for anyone who decided to go with that stack.

Re: React Labs: What We've Been Working On – February 2024

#80

Earlier quoted context omitted.

React isn't a Vercel product though, and server components are a react feature rather than a NextJS feature. With regards to incentives, these newer react features only meet their goals if the goal is to use react the open source project as a funnel for Vercel, the for profit hosting company.

Most of the core React devs are employees at Vercel. As much as you may not like it, core parts of React are driven by Vercel 's business model.

Is React no longer a Facebook/Meta project?
Post reply on HN