Vue 2 was the closest thing that I’d really like to use: just my data with methods + declarative ui with bindings.
Call me old-fashioned, I still prever model-view relationships separated. Can’t see what’s wrong with having a non-visual model that works on its own and then putting views on top of it to make it accessible to a user. Not only that, I don’t get why I would write model logic in a way that would nail it to a views system.
Js objects have observable properties and (with some care) they can even be shared across different subsystems/libraries.
What I’d like to see is a UI library that takes my “instanceof Foo” with its value properties, getter properties and methods and observes it. Then I write vue-like html or hyperscript with an assumed root object:
The my_counter remains free to use elsewhere or to be included into a larger structure. The goal is that ui will notice “.count =” anywhere and schedule an update to dom.
Js is absolutely full of features which all these frameworks are trying to reimplement for some reason. There are rough edges that Vue addressed (array obs mostly) and I thought that wow that’s its purpose with some helpers around it. Nice, the next step is to deprecate Options in favor of just js. But it went completely downhill since with sfc and composition and all.
Completely my feelings as well. I have an old desktop app I wrote a few years back in Vue2. The NodeJS version and all related libraries are outdated. But I can’t bring myself to update it to Vue 3. Every time I sit down, I am left wondering why such a rewrite is even necessary. So it’s still chugging along with contributions from others for the old code. When GitHub actions stops building the binary packages, I will have to eventually update I think.
Comments
Vue 2 was the closest thing that I’d really like to use: just my data with methods + declarative ui with bindings.
Call me old-fashioned, I still prever model-view relationships separated. Can’t see what’s wrong with having a non-visual model that works on its own and then putting views on top of it to make it accessible to a user. Not only that, I don’t get why I would write model logic in a way that would nail it to a views system.
Js objects have observable properties and (with some care) they can even be shared across different subsystems/libraries.
What I’d like to see is a UI library that takes my “instanceof Foo” with its value properties, getter properties and methods and observes it. Then I write vue-like html or hyperscript with an assumed root object:
The my_counter remains free to use elsewhere or to be included into a larger structure. The goal is that ui will notice “.count =” anywhere and schedule an update to dom.Js is absolutely full of features which all these frameworks are trying to reimplement for some reason. There are rough edges that Vue addressed (array obs mostly) and I thought that wow that’s its purpose with some helpers around it. Nice, the next step is to deprecate Options in favor of just js. But it went completely downhill since with sfc and composition and all.
Completely my feelings as well. I have an old desktop app I wrote a few years back in Vue2. The NodeJS version and all related libraries are outdated. But I can’t bring myself to update it to Vue 3. Every time I sit down, I am left wondering why such a rewrite is even necessary. So it’s still chugging along with contributions from others for the old code. When GitHub actions stops building the binary packages, I will have to eventually update I think.
Your example looks quite like the intro example to Pinia for Vue: https://pinia.vuejs.org/introduction.html
I don’t really see any tangible differences between Vue 2 and 3. As far as I know there are no plans to remove the Options API.
It's called Mobx, I use it all the time to not have to touch React's stupid API.
I remember approaching it at least twice, but it didn’t click for me. Should try again, thanks!