|
|
|
|
|
by nawgz
1247 days ago
|
|
> The way we make webpages is so disconnected from the technologies that browsers offer us. Can you say more about this? I don't really see how "actual applications" differ from a React app in a meaningful way; React apps almost always leverage the capabilities of of course HTML/CSS/JS, history, AJAX/HTTP, cookies, and so on. As the JS distributions evolve, the build systems do too in terms of output. Maybe I misunderstand something, but in general the idea that just writing vanillaJS or some analogue would be sufficient to deliver the quality of apps enabled by frameworks (and talented devs) seems a bit naive to me. |
|
React is everything the web (in its initial conception) was never meant to be.
HTML was meant to be used for static documents. CSS (single file, linked to by all documents) was meant to add styling to all those documents. JS was meant to add simple interactivity to documents. Navigating between documents reloads everything and no state is kept (other than user sessions of course). We broke every single one of those concepts and the way they were meant to be used.
Now, our HTML consists of a single index.html with a div#app and primarily content in the <head>. Elements are entirely generated by JS. Most of the time you just load a single big JS file that contains everything and navigating just replaces elements, state-wise you're still on the same document. We want all kinds of fancy CSS features that won't be implemented for another 25 years so instead we use transpilers. That is, if we don't include our CSS in the JS. Did I say JS? I meant JSX, because we don't even write HTML directly anymore. The point is, we don't use any of the 3 the way they were meant to be used.
We've built layers on top of layers of abstraction to be able to add a level of interactivity that was never meant to exist on the web. Instead of coming up with a new way of building actual applications that meet all our needs, we keep (poorly) patching old technology to get it to play nicely with our modern needs. It's a constant fight and a gigantic waste of everyone's time. We can do better.