Frameworks like React aren't the real headache today, for me at least. It's all the machinery of web development. Webpack, babel, polyfills, various CSS transforms and ways to utilize CSS (sass, less, CSS modules, CSS inline, the list is a mile long).
My organization has tossed so many manhours into maintaining webpack and our build that you could recreate our entire site numerous times over in a bog standard LAMP stack with a fraction of the headcount. The cost of a modern web dev stack is no joke. And for what, I might ask? The UX of a single page app is atrocious. The canonical example of SPA done right is Google Maps. Ever tried Google Maps on a mobile browser? There is a reason the native app still exists.
SPA is, at best, a desktop-first experience that we're trying to force into a mobile-first world we live. It's nearly the definition of insanity, what we're trying to do with the web today.
In the process of everyone following Google and Facebook, we are also destroying the essential ingredient of the web: links. Everything is a walled garden with internal state and incredibly fragile external links (if any at all). Pinterest and Quora, everywhere. What will define the web of the 2010-2020+ is that everything is broken and everything sucks.
>For those who can't live without a framework: What would you miss?
Well, my favourite of choice is Elm, and it's correctness guarantees are really a huge deal to me. Whenever I have to do react or even just vanilla js for work, unless it's really miniscule I will nearly always run into runtime errors because I just forget to check something for null or do something stupid like not awaiting a promise (and that's before any other developers get involved). Typescript helps out a certain extent but I find it isn't nearly prescriptive enough. It's not like I'll ever convince my company to adopt Elm though (and believe me, I tried), so c'est la vie.
Although I suppose these might be considered different languages rather than just a framework, which is where the benefit comes from? It might be just that I'm not very good with dealing with JS as a language rather than needing a framework specifically.
> For those who can't live without a framework: What would you miss?
The thing I miss the most is a good component and state abstraction. That's it.
I would be very happy using ASP.NET WebForms today: components are rendered 100% in the server but the state is persisted by the client using a <input type=hidden> field. The server can be 100% stateless.
Too bad it is impossible to convince anyone to pick up ASP.NET WebForms in 2020 :)
Modern backend frameworks such as Rails and Django have similar "component-ish" helpers, but those always fall short of the capabilities of both React/Vue and ASP.NET WebForms, and you have to worry about state by yourself.
Phoenix Live View is cool, but needs a stateful server, requires JS and polyfills up the wazoo. At this point I'd rather use Vue or React.
part of our code base is a bunch of webforms, it really does work quite well and surprisingly easy to work with in many cases. Would've been interesting if they had kept innovating around the concept.
I go back and forth on this all the time. We have a variety of projects at work and relatively few bodies working on them. Definitely more projects than programmers.
Part of me feels like using "overkill" frameworks for everything is a better bet. It builds more familiarity and expertise. It certain makes some projects more complex than they need to be, but it makes it easier to switch from project to project.
I'm in a similar state of mind as you. Any time I start a web project now I just write vanilla JS and none of my hobby projects has yet to reach a point where I wanted a framework. There have been a couple times, particularly dealing with interactive forms, that I found myself writing a lot of the same code over and over again. I think this would be the first place I would start to build my own little framework. But it hasn't yet made me want to introduce React or Angular to the project. Especially when I consider the hours of free time that I would spend on setup rather than building the actual project itself.
Svelte is not like other frameworks. The core is basically one thing, which is to generate code that updates components when data they depend on changes, just like you would do it yourself when not using a framework. There is no runtime or shadow DOM or anything.
That means you can write in a more functional style: input data -> output HTML+CSS.
Svelte isn’t reaaaally a framework in the way React is, although they do share some commonalities.
It’s pretty innovative in that it’s not really big JS bundle, but more of a compiler for what is essentially quite vanilla JS code. In the end, if you use Svelte, then your final product will be pure HTML/CSS/JS.
I love it because it lets me bundle logically related markup, styling, AND javascript in the same .svelte file. Plus, it’s blazing fast.
I sometimes use external libraries. For example handlebars if I want to template something clientside.
But no more frameworks.
I think pure Javascript is plenty enough these days.
For those who can't live without a framework: What would you miss?