vuejs / vuex

🗃️ Centralized State Management for Vue.js.
https://vuex.vuejs.org
MIT License
28.42k stars 9.58k forks source link

No examples of how to use properly typed modules with Vuex 4 in composition API #2168

Open kpturner opened 2 years ago

kpturner commented 2 years ago

Version

4.0.2

Reproduction link

vuex.vuejs.org

Steps to reproduce

It is not really something that I can create a repo for. I simply cannot fathom out how to do it properly with the somewhat scant documentation on the subject. The documentation tells me how to create a top level store in Typescript, and the documentation separately tells me how to create modules, but the documentation does not tell me how to implement modules in a Typescript environment such that everything is properly typed.

What is expected?

More in-depth Typescript and composition API documentation that covers all the other aspects (modules etc) not just a simple single top-level store.

What is actually happening?

It is left to guesswork and trail and error.