by pimterry · 1y ago · 0 comments
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?
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.
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.
And you may have to work with developers who have a different preferred subset.
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.
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.
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.
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.
I think the signals integrations are great added value to the "classic React" formula.
Light weight bundles too, can't recommend it enough.
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'm not entirely sold on Svelte 5 for the same role - I think it gives up some DX - although maybe I just like the thing I'm used to.)