-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Vue 3 #342
Comments
You can use it as before. Just create A module and import it to use. Don't even need to install to the Vue app.
|
Make yourself a favor and stay away from vuex and this module when using vue 3 and just use the composition api (if possible) |
@VitAndrGuid could you explain what you mean about the composition API (I don't know much of it) ? What's new that makes the store less useful than before ? |
@ndup0nt The composition API doesn't make this package less useful. It exposes vue reactivity system outside of components, with that you can create your own state and modules on simple .ts files, with full Typescript support, if you're tired of fighting vuex lack of proper typescript support and you don't depend on vuex and its plugins you might as well just write your own simple and easily testable "store". I have written a big application with Vue 2 + vuex + vuex-module-decorators but issues such as: #304 #125 #277 and other made it quite a pain, but i sticked to this lib because as far as i know there is no mature state management library for vue2 with ts support, but you don't need one in vue3 |
@VitAndrGuid Are you saying this library is confirmed stable in Vue 3? I have a huge enterprise app that utilizes this library and I would very much like to get it into Vue 3 and start utilizing the composition API in our new dev without having to rewrite all of our global state handling. |
@Klowes |
@VitAndrGuid can you elaborate? Are we talking about global refs/reactives ? |
@tvkit yes |
@VitAndrGuid could you share a link to a good code example with composition API showing how one can use it instead of a vuex module so that me and others can take a look and make their conclusions/decisions? PS Looked up some tutorials so that others can jump in (although a definitive article would be nicer): composition API and some pros/cons of substituting Vuex, a course on Vue 3 + TS, composition API video. @miyukoarc could you show how to use getters from your example in components? I'm getting
What I'm getting is – both PS I also wonder if it's possible to use the old way, to make the modules accessible from |
Well.. for any readers out there pondering their state management and hitting this thread, a lot has changed in a year and a half:
Not one for bumping old threads, but hey, here I am. |
I think most people are looking for upgradeable Vue2 > Vue3 libraries because a large number of Vue libraries (e.g. vee-validate, v-tooltip, v-calendar, vue-multiselect) have difficult migration paths. And migration from Vue2 to 3 is not an incremental process, it has to require a significant initial chunk of work (migrationg to Vue3 compat build + migrating to all the other dependent libraries). So if developers have one less library to worry about in their migration path the better it will be. We are still struggling with a reasonable plan to migrate to Vue 3 which doesn't require weeks/months of development stoppage while we migrate. |
@NikhilVerma what solution did you end up with ? |
Given that Pinia is the preferred state management way for Vue3, I am not seeing much use of keeping this thread alive with any hope :) |
I'm using Vue 3 + Typescript with
vue /cli
, but I'm not getting it to work./store/counter.ts
/store/index.ts
any suggestion?
vuex-module-decorators
still don't support Vue 3?I read several times @championswimmer saying that I was waiting for vue 3 to be released to update the package, but it has already been released, already it will launch Nuxt 3 too ... I would love to use
vuex-module-decorators
The text was updated successfully, but these errors were encountered: