It feels like React generally has an ongoing trajectory towards increasing complexity and features. For something that's effectively become the standard for frontend that's unfortunate. It would be great to have a simple reliable base, with extensions & addition complexity layered on top or included optionally. This announcement doesn't fill me with hope for that direction unfortunately, it mostly seems like Vercel getting more control, and they're driving a lot of that movement.
Being able to ignore parallel rendering, RSC, hooks, etc, and just write simple code for simple sites again would be fantastic.
Unfortunately all the major competition I've seen seems so significantly different that migrating any kind of non-trivial application would basically be a full rewrite. Is Preact or similar offering much promise here?
> Being able to ignore parallel rendering, RSC, hooks, etc, and just write simple code for simple sites again would be fantastic.
I don't understand this statement. You can use the basics without involving yourself with anything complex. You can even still use class components. You can build components that are framework agnostic.
When you're new it can be hard to tell what to ignore; it makes it tempting to pick a simpler framework that you can entirely grasp. Also any published examples, chatgpt etc won't be aware of the subset you've chosen to use when they're providing examples; they're gonna draw from the full set.
I feel like that's more of an issue with the examples and LLMs? Discounting a framework just because it has ever increasing, completely optional capabilities doesn't compute to me. I'm not convinced there's a real problem.
The problem comes in when the complexity is both not optional and not rational.
Hooks do not work as real functions. They are magic. Why are they magic? I don't know, they certainly don't need to be. What state do they change? I don't know. Why do they look pure but actually mutate the application states? I don't know.
Why is react not reactive? Why is it if I change state the entire website rerenders? I don't know. React has a virtual dom. It knows when I change state because I have to tell it, manually. And then... It doesn't use those.
But it's okay, because you can `useMemo`. Why do I have to do that? I don't know.
Evidently I don't have to do that, because react has a compiler that does it automatically now. Why can't react just do it? I don't know. Clearly it's possible. And also every other framework does it.
There are real functional libraries like Effect, pretend functional library like React and just honest old style library like MobX. I think I know my preferred style.
Last time I looked, their own docs didn't even tell you how to create a basic SPA, merely that it was possible and scary. That doesn't inspire a lot of confidence.
yes, but literally everyone will tell you to move away from that. It's like saying if you're not physically violated then you should put up with verbal harassment because it doesn't matter in any real way.
At the very least whoever using class components would have to routinely defend their decision every quarter when confronted by colleagues who understandably just wanna write conventional code.
I tried to wrap my head around hooks, to effectively use them, and have a complete grip over the app, but I kept falling into the "magic" pit.
Things work, But I no longer know how they work.
Frustrated, I shifted to angular with signals, and now my cognitive load to understand data and events happening in the app are clearer and I feel I know what exactly is happening.
Not sure if this feeling is common, of helplessness with react.
I had exactly this problem. In my experience, the documentation over-simplified things to the extreme. Why are hooks not normal function calls? Where do they get their state? Why are they not functionally pure? "Functional purity" has been muddied too. It used to mean a function whose output depends only on its parameter values. But hooks are not pure, and thus components that depend on them are not either. But react still uses this language.
None of the official docs helped, but I found myself required to use it for work. And I faced confusing behavior I could not explain with the documentation. So I went on a deep-dive for a month or so. I didn't learn everything about react, but I got an intuition for how hooks work. That's not to say I like them. I'll use them now only if I have to, but at least I can. To my mind, hooks present a surface that's difficult to make sense of and hard to use.
Every fiber has a parent. I suppose the behavior, although possibly not the implementation, is that the ancestry chain is walked up until the nearest context provider is found. That will be the fiber associated with rendering context that provided the context.
> It feels like React generally has an ongoing trajectory towards increasing complexity and features. For something that's effectively become the standard for frontend that's unfortunate.
Is that not every software development effort, ever? Isn't that why "todo" apps, search engines, etc, constantly get "recreated". Live long enough to become the enemy and get replaced by a bare bones app that'll bloat itself into oblivion and repeat the cycle?
Oh, dear. Yet more ways of dealing with React that coders will be forced to deal with. But in a way this might be good for engineers because the quantity of foot guns available in various flavors and versions of React appears to have already scaled far beyond the capabilities of available LLMs to handle.
In one of my recent doomed interviews I explained that I had been following React for a while and was practiced at a number of ways of using it. Developers in the group then kindly informed me that the reason I had learned multiple ways of using React is that I had not yet found the one true way which of course they were using. Got no offer from them which is probably good for all of us.
Most companies don't really need the majority of React's power. There is room for a low to mid level complexity library/framework to fill the space that the majority of sites really need (like, that brochureware site should be statically generated and needs none of what React offers and the site that deals with dozens of requests per minute can be greatly simplified). What we need is a low complexity tool that has a fantastic DX. Of the many projects that deal with this none has taken hold in the way that React has.
One is the DX as you mentioned; eg Hugo is nice, but editor integration for autocomplete, warnings, etc is basically non-existent that I’ve seen. Templating is also really clunky relative to React.
The second is Reacts omnipresence means there’s usually pre-built stuff I can pull in if I just want to iterate fast.
The third is that typically the best way to get a low complexity and good DX static site generator is just to roll your own with only the features you need. They get a lot simpler when you aren’t dealing with an ever-expanding list of feature requests and usecases. You decide whether you want types or editor integrations or whatever by duct taping together a few libraries.
I don't have experience from any larger application, but from my smaller usage Preact seems like a drop in replacement. It's been compatible with the react libraries I've tried. It also works great with ES modules. So for simple stuff, I think it's worth a try.
Being able to ignore parallel rendering, RSC, hooks, etc, and just write simple code for simple sites again would be fantastic.
Unfortunately all the major competition I've seen seems so significantly different that migrating any kind of non-trivial application would basically be a full rewrite. Is Preact or similar offering much promise here?