Never installed Vuex in Web
Closed this issue · 3 comments
galenyuan commented
https://github.com/weexteam/weex-hackernews/blob/master/src/store/index.js#L7
This line should be
if (WXEnvironment.platform === 'Web') {
Vue.use(Vuex)
}
galenyuan commented
hmm, why contained Vue.use(Vuex)
in IfStatement?
I think both Web and Weex need to install Vuex first
Hanks10100 commented
Because the Vuex
is auto installed on the web. https://github.com/vuejs/vuex/blob/v2.2.1/src/store.js#L426-L429
This code works for me on the web.
galenyuan commented
😂 make sense