▲ | hackingonempty a day ago | |||||||
React (and Elm and the many other inspired frameworks) is a beautiful model for writing apps but because it is not the browser's model it is an instance of the "Inner Platform Effect" anti-pattern. The performance is never going to be as good as embracing the built in features of the browser and using minimal JS to accomplish the interaction you need. Maybe it can be justified for real apps like desktop apps but the vast majority of web pages that use React could probably provide a better experience to users without it. | ||||||||
▲ | jauntywundrkind 21 hours ago | parent [-] | |||||||
To some degree, and to madlib your statement, alike how: C code is never going to be good as embracing the built-in features of the x86 asmcode and using minimal code to accomplish what you need. Which is to say, that isn't really a goal or objective, imo: it's an unhealthy prediction for misoptimizations, to worship the vanilla.js performance above all past. More-so, there were so many very very very unperformant web apps before React. So many incredibly bad ways to manipulate DOM. And the spiralling combinatorial possibilities of updating state yourself were gnarly, create enormous cognitive load on every dev in the org. I know I've just written a pretty big anti- post. But I feel both sides really strong. I don't want either extreme to be accepted. Inner Platform I see as good and necessary. But also I definitely hope for better someday, see us making lots of Inner Platforms, that might be much smaller / better organically interweaving Inner Platforms. Reacts flaws are significant, a full extra DOM, diffs, coarse grained updates (which I think maybe React Compiler tries to seek out?) all do so much but are a huge abstracting for an Inner Platforms, not necessary imo to what Inner Platforms would have to be. It's amazing how much React gets us, how much consistency & clarity of code & it's purpose (with its immediate mode ish rendering scheme), and the performance is overall stunningly good. But there certainly is significant overhead, lots of code to load & execution time for it. Rather than looking to return back, I want to look onwards. The "Inner Platform" idea is an amazing & useful framing. I want WebComponents to let us escape this, to be some common system we can agree too, but I suspect even with WebComponents—if they get any broader traction—we will eventually see "inner platforms", paradigms for use and interlinkage that go beyond the very basics of HTML (although Invokers radically and excitingly open up the space of component interacting with components in standard ways!). Maybe it's not so clear cut a decade+ later, but pieces like The Extensible Web Manifesto speak to a clear loud vocal acceptance of the web as a lower level platform, as a tool that can have higher level expressions built stop it. Theres an expectation of going further, architectures above. https://github.com/extensibleweb/manifesto Imo it sucks that we near a decade of React Uber Alles, stealing the oxygen that would nourish the web's flourishing. And there's hope for using more of the putter platform: that React as an Inner Platform does a lot of reinvention that maybe ought not be necessary. I guess the question I want to ask is, how little can we make our Inner Platforms, while still retaining the legibility of architecture? Can we decompose that Inner Platform into smaller interoperable pieces, protocols, for how things signal and flow, rather than it being a monolithic platform? What of the Outter Platform could be better used for performance and inter-op, to de-interiorize? It is dangerous and bad to me to demonize Inner Platforms, to attend only to notions of pure performance as the guiding factor. The karmic wheel imo needs to be going around faster harder, creating and destroying the inner platforms. We have a lot more to explore, have only a couple examples of what web architecture could be and right now the React Inner Platform is a thick boy of an Inner Platform. But it's not just getting rid of Inner Platform that's the goal. | ||||||||
|