greenpress / vuex-composition-helpers

A util package to use Vuex with Composition API easily.
https://www.npmjs.com/package/vuex-composition-helpers
MIT License
290 stars 32 forks source link

get error with vite+ vue 3 #25

Open Zony-Zhao opened 4 years ago

Zony-Zhao commented 4 years ago

I just use this lib in a new vite template project.

package.json

image

error

image

davidmeirlevy commented 4 years ago

This package, together with @vue/composition-pi package, are only meant to help you upgrade your project to the new API. Consider it as a train station.

The API that exists in this package will "natively" exist on the next version of Vuex (4).

So if you're using Vue3 and Vuex4, you can get the same functionality from 'vuex' library directly.

Valian commented 4 years ago

I'm having the same problem as @Zony-Zhao.

@davidmeirlevy It would be great if we could use it natively, but I think it's not exactly true. According to https://github.com/vuejs/vuex/issues/1725#issuecomment-637427339 that functionality is not in Vuex 4 and probably won't be (at least I don't see any decision in that area).

In addition, in that video https://www.youtube.com/watch?v=ajGglyQQD0k it looks like Vuex 4 will only support Options API. Vuex 5 might be a solution, but who knows how much time is needed? Your helpers really could help people in that weird transition period between Vuex 3 and Vuex 5.

davidmeirlevy commented 4 years ago

Ok so it's probably good idea to create a new version that fits vue@next.

Can you contribute this kind of version?

Valian commented 4 years ago

@davidmeirlevy I've started working on that, still some tests are failing, mostly ones where we're comparing rendered values. Will dig deeper soon.