Closed janat08 closed 7 years ago
Isn't 1.4.2 error.
https://laracasts.com/discuss/channels/vue/vuex-anybody-typeerror-thisstorecommit-is-not-a-function
I'm pretty much following the solution with the defaul library I suppose.
Well then so I cross referenced what "this" gives at example repo and what I got, and the library doesn't have some exceptional errors, although with looping root in extended store and hectic patterns I may as well be looking at benign parts that have been ported over from original library for vuex.
_addAction(action) {
return (store, ...args) => {
if (!(store instanceof ExtendedStore)) {
args.unshift(store);
store = this.store;
}
return action.call(this, {
store,
state: this.getState(store.state),
}, ...args);
};
}
}
this is what my action amounts to within console, and it has these closures: Closure (_addAction) Closure Closure (meteorInstall.node_modules.meteor.akryum:vuex.client.client.js) Closure Global
Please help? I corrected the typo for this.action.shouldBeMappedAction.
Stuck the vuex injection into new vue rather than app layout, and still wouldn't work.
What is your full component code?
Which version of Vue are you using?
"vue": "^2.0.3",
"vue-router": "^2.0.0-rc.5",
"vuex": "^1.0.0-rc.2"
vuex is 1.0.0
Well, you are trying to use an incompatible version of vuex with Vue 2.0 and my Meteor vuex package isn't compatible with Vue 2.0 either.
Beautiful, I speculated about such a case within forums, I think; No one acknowledged that.
"As for Vuex, even version 0.8 is compatible with Vue 2, so you’re not forced to upgrade. The only reason you may want to upgrade immediately is to take advantage of the new features in Vuex 2, such as modules and reduced boilerplate."
They say it should be fine, whats the problem and is it going to get fixed?
Just in case maybe you could assign this to a milestone?
At very least porting over some of the convenience functionality would be splendid like reading from state directly rather than having to declare getter for every state.
Well, you can use mapState
to access the state directly: documentation.
I think I need vuex for component-to-component communication (Non-Parent to child communication) on a larger scale (lots of state on one page).
Can I install akryum:vuex and start using vuex today even though I'm using Vue 2.0? The examples over at https://github.com/Akryum/meteor-vuex-example seem to be using Vue 1.0?
akryum:vue 1.2.2 akryum:vue-component 0.8.0 akryum:vue-router2 0.0.2 vue: 2.1.8 vue-meteor-tracker: ^1.0.4 vue-router: ^2.1.1
The Meteor vuex package is only for Vue 1.x, as I will do a different and more generic npm package for vuex 2. You can still install vuex 2 and follow the guide.
Oh well, using vuex stand alone without akryum:vuex hasn't occurred to me.
to be clear mapstate isn't supported in your package, since you link to vuex 2 documentation and it looks like vuex 1 doesn't have mapstate.
Yes, vuex2 doesn't work like vuex1.
Well then map state shouldn't be available, although I just concluded that it's essentially the same stuff mapping it through mapstate or getter.
On Tue, Jan 17, 2017 at 6:43 PM, Guillaume Chau notifications@github.com wrote:
Yes, vuex2 doesn't work like vuex1.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Akryum/meteor-vue-component/issues/84#issuecomment-273134307, or mute the thread https://github.com/notifications/unsubscribe-auth/AKz-gbH-joOdex-JnCyQEf2N4nDCWirdks5rTLd1gaJpZM4KrVmI .
Seeing how original vue is hell to debug with it's "common" junk (maybe you could share your secret with them), would you comment on how horrific vuex 2 is? I belief I used their web pack constructor, so it's probably the lib that's shite.
http://pastebin.com/zGfuqwxw this.callMethod