weexteam/hackernews-App-powered-by-Apache-Weex

Never installed Vuex in Web

Closed this issue · 3 comments

https://github.com/weexteam/weex-hackernews/blob/master/src/store/index.js#L7
This line should be

if (WXEnvironment.platform === 'Web') {
  Vue.use(Vuex)
}

hmm, why contained Vue.use(Vuex) in IfStatement?
I think both Web and Weex need to install Vuex first

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.

😂 make sense