by Liron · 7y ago · 0 comments
Interesting that React is fundamentally an invention at the level of programming language design, an insight about how to best express UI behavior. This means we could have had it (or any mainstream functional reactive programming) much earlier or later than we did. It came on the scene at an arbitrary unpredictable time.
This article reads a bit like a blast from the past in that sense. I think if I dig a little I might be able to dig out some papers from the sixties and seventies advertising the virtues of functions, modules, and even components with very similar language as in this article.
There is some progress here of course. Internalizing CSS is a good thing. Having that as a separate thing to manage and align is just too painful to keep in a maintainable state. I think some people are still disagreeing with this but I've seen some examples of css increasingly being driven from javascript instead of shipping as a separately loaded and created artifact. Web components sort of formalize this in html/javascript and allow you to isolate components from each other, which is another good thing. Separation of concerns and isolation are good things.
Also good is the shift to typescript, a language with a bit stricter semantics than javascript and of course better typing. The article does not mention this but given the speed and confidence with which they did this, I suspect they'd be pretty happy Typescript users.
Other than that, I think React is mostly a variation of the same kinds of design patterns that have dominated UI development for the past decades. I did some Swing development in the nineties and I still think that was a pretty nice framework to deal with relative to the current madness that is modern web development. The web can still learn a few new tricks. I have good hopes for WASM bringing some more choice and options to the scene.
I don't assume Microsoft was innovating at any point since the 90s, wasn't WPF a response to Mac OS X compositing layer ?
Also I didn't mean to glorify the web. But I really think that it was the main driver of new mainstream desires in terms of UI (not to my taste). Even more than native iphone/ipad application no matter how sleek and sophisticated because of how few dev and users they had compared to web apps.
Still, wasm is good enough for pretty sophisticated stuff. I was playing a version of doom 3 ported to wasm a few days ago; with decent frames per second even and quite playable: https://news.ycombinator.com/item?id=18817278
In case of React, to me, i no longer bother with syncing state with html, something like `node.innerHTML = `${my_state}`
It's actually beneficial to me.
Like saying that with this new car, I no longer bother checking whether the wheels aren't about to fall off. :)
If you do any web development at all, chances are you will have to work in a React codebase during the next decade