There is no relevant documentation on the official website, how to use module in the component after Vuex divides it. MapState ['] use state?

namespaced is written as a real cheat in namespace dynamic language

first of all, why can"t I even get a module?
below is my store structure
clipboard.png

.

part of the code within the component

import {createNamespacedHelpers} from "vuex"

const {mapState} = createNamespacedHelpers("user")

//user modulestateuser
...mapState(["user"]),

console error [vuex] module namespace not found in mapState (): user/

first of all, you can"t get a single module, let alone more than one,

several of my ideas are to rename mapstate and search for mapState:userMapState on the Internet. That"s it.

but why can"t I get user?

Apr.13,2022

reference: https://codeshelper.com/a/11...


const {mapState} = createNamespacedHelpers('user')
The

line has already got the user, where mapState stores the state of user.

Menu