vuex-class icon indicating copy to clipboard operation
vuex-class copied to clipboard

Support for vue 3.0

Open StarkShang opened this issue 3 years ago • 15 comments

Can vuex-class support vue 3,0?

StarkShang avatar Mar 11 '21 13:03 StarkShang

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.

pocketcolin avatar Mar 22 '21 17:03 pocketcolin

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

liuaiyuan avatar Mar 25 '21 05:03 liuaiyuan

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 avatar Mar 25 '21 09:03 MasterShu

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

glen-84 avatar Apr 26 '21 08:04 glen-84

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

andersnygaard avatar Jun 08 '21 13:06 andersnygaard

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: @lion/[email protected]
npm ERR! Found: [email protected]
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 [email protected]
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.

MrLiuFang avatar Oct 20 '21 09:10 MrLiuFang

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

sienrik15 avatar Mar 10 '23 21:03 sienrik15

@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 avatar May 04 '23 14:05 pasoevi

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 avatar May 16 '23 12:05 pasoevi

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.

pasoevi avatar Jul 11 '23 12:07 pasoevi

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 avatar Jul 31 '23 15:07 wangzhiguoengineer

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 avatar Jul 31 '23 15:07 wangzhiguoengineer

@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 avatar Jul 31 '23 15:07 wangzhiguoengineer

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

wangzhiguoengineer avatar Jul 31 '23 15:07 wangzhiguoengineer

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.

maxKimoby avatar Oct 11 '23 15:10 maxKimoby