ktsn / vuex-class

Binding helpers for Vuex and vue-class-component
MIT License
1.73k stars 86 forks source link

Support for vue 3.0 #67

Open StarkShang opened 3 years ago

StarkShang commented 3 years ago

Can vuex-class support vue 3,0?

pocketcolin commented 3 years ago

With vue-class-component now supporting Vue 3 in an rc-1 release, it would be pretty great to have vuex-class supporting it as well.

liuaiyuan commented 3 years ago

I tried to use vuex-class in vue3.0, there seems to be no problem;

MasterShu commented 3 years ago

I've created a package to support vue3, I've used in vite project with vue-ts. Install it npm i s-vuex-class This project fork from this package, just make it support vue3.

glen-84 commented 3 years ago

@ktsn Any plans to update this library for Vue 3?

andersnygaard commented 3 years ago

An example for Vue 3 here - https://davidjamesherzog.github.io/2020/12/30/vue-typescript-decorators/

Used s-vuex-class and got it working with latest version of Vue

MrLiuFang commented 3 years ago
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: @lion/lion-frontend-component-frame@1.1.0
npm ERR! Found: vue@3.2.20
npm ERR! node_modules/vue
npm ERR!   vue@"3.2.20" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.5.0" from vuex-class@0.3.2
npm ERR! node_modules/vuex-class
npm ERR!   vuex-class@"0.3.2" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
sienrik15 commented 1 year ago

Work dependency: "vue-class-component": "^8.0.0-rc.1", "vue-property-decorator": "^10.0.0-rc.3", "vuex-class": "^0.3.2"

pasoevi commented 1 year ago

@sienrik15 could you confirm you're using vuex-class and not s-vuex-class? Looking at your dependencies, not sure how this would work: vue-class-component would work with Vue 3.x but vuex-class wouldn't.

pasoevi commented 1 year ago

I've created a package to support vue3, I've used in vite project with vue-ts. Install it npm i s-vuex-class This project fork from this package, just make it support vue3.

MasterShu, the npm package s-vuex-class points to https://github.com/MasterShu/vuex-class repository, which doesn't have the source code for the same version. Any chance you could publish it?

Also it seems to only work with vue-class-component but not vue-facing-decorator.

pasoevi commented 1 year ago

Any updates on this? Looks like Vue 2 -> 3 migration for projects using class components + decorators + vuex-class is almost solved, the last missing peace seems to be vuex-class.

wangzhiguoengineer commented 1 year ago

Can vuex-class support vue 3,0?

Designed for vue 3, do the same work like vuex-class. https://www.npmjs.com/package/vuex-facing-decorator

wangzhiguoengineer commented 1 year ago

Any updates on this? Looks like Vue 2 -> 3 migration for projects using class components + decorators + vuex-class is almost solved, the last missing peace seems to be vuex-class.

Designed for vue 3, do the same work like vuex-class. https://www.npmjs.com/package/vuex-facing-decorator

wangzhiguoengineer commented 1 year ago

@sienrik15 could you confirm you're using vuex-class and not s-vuex-class? Looking at your dependencies, not sure how this would work: vue-class-component would work with Vue 3.x but vuex-class wouldn't.

Designed for vue 3, do the same work like vuex-class. https://www.npmjs.com/package/vuex-facing-decorator

wangzhiguoengineer commented 1 year ago

Work dependency: "vue-class-component": "^8.0.0-rc.1", "vue-property-decorator": "^10.0.0-rc.3", "vuex-class": "^0.3.2"

Designed for vue 3, do the same work like vuex-class. https://www.npmjs.com/package/vuex-facing-decorator

maxKimoby commented 1 year ago

Work dependency: "vue-class-component": "^8.0.0-rc.1", "vue-property-decorator": "^10.0.0-rc.3", "vuex-class": "^0.3.2"

Designed for vue 3, do the same work like vuex-class. https://www.npmjs.com/package/vuex-facing-decorator

Thanks a lot! It works like a charm.