Use Vanilla Js
Thus when a new framework comes around that promises to solve this problem people tend to jump the boat only to later realize that they cant do something else in that and so does the descend into the spiral of madness continues.
So what to do about It
The solution to this is pretty simple don’t use frameworks rather pure Vanilla Js with some libraries ( like lodash, ramdajs, axios etc.. ) to solve the problems. Considering most modern browsers have large stable API you might not even need to use Jquery. The advantages of libraries over framework is that they just provide utilities that help you solve the problem rather than trying you to make you follow some steps so that the problem could be solved in a particular way. Thus you are free from the mortal bounds of this frameworks.
Don’t write frameworks
Another important thing is that you don’t need to write a complete new framework that is not what i’m talking about. If you have your application build as separate small reusable Lego bricks (modules) written in pure js with each of them designed to solve one particular problem in mind with controlled input and output with minimal side effects. Then your Application becomes more composable. so that later on you could throw out one of these modules when you don’t need that feature and replace that Lego brick with some new one so that it does something else different now. And each Lego brick ( module) is easy to test for defect and can be fixed with kragle if it is broken.
With Great power comes great responsibility
While using vanilla Js is great since it provides great flexibility it comes with a price you need to know good amount of Js to do useful stuff with it. This is a good thing because if you know good amount of Js and can build useful stuff with it. Then you can solve problems easily and you wont ever have the need to learn another new shiny framework. Thus it will free you and give you a peace of mind and you can spend all your focus in solving the real problem rather than solving the meta problem.