3 ms·
I actually see the React compiler plans as a net positive. It introduces complexity in the toolchain which seems bad, but should serve to eliminate a lot of dev
by steve_adams_86 4y ago
I actually see the React compiler plans as a net positive. It introduces complexity in the toolchain which seems bad, but should serve to eliminate a lot of development pains they've introduced over the years. If they get it right, I expect that the dev and user experience on the other side could be quite a bit better.
Automatic memoization, signals under the hood, eventually moving away from the VDOM — so much of what people have come to find cumbersome about React can be eliminated by a compilation step doing a lot of these things for us. It's a bit strange that so many React developers don't know when or why to utilize useCallback, useMemo, etc... but maybe it was a mistake to expose those and leave it to developers to know when to use them, given that in a declarative system it can be automatically determined where it would be beneficial or not.
I'd prefer to use something else with a more thoughtful design and implementation, but React is well-entrenched. I don't think we'll stop using it any time soon. I still like it, too. The frontend world has arguably had to deal with much worse problems than the complexity of React, and it's a well-worn path that's typically easy to traverse by now. So, net positive I hope.
- 0xblinq 4y agoUntil things fail or don’t go as expected and it’s imposible to know what the hell is going wrong. That’s the biggest problem with complexity, not just understanding it from the user point of view.
- steve_adams_86 4y agoI agree. At the moment that’s what’s going wrong in countless react applications already though, largely due to things a compiler could catch automatically. I’m not saying it’s perfect, but I expect the case you’re anticipating will be less common (though harder to resolve) than the ones which plague people today (whether they realize it does or not… The lack of awareness is one of the worst parts in my opinion, and why resolving it in the background seems ideal).