What exactly is namespacing of modules in vuex

前端 未结 4 946
再見小時候
再見小時候 2021-02-07 03:07

I have recently started with vuex.

The official docs explains well what modules are but i am not sure if i understood the namespaces in mo

4条回答
  •  面向向阳花
    2021-02-07 03:33

    To using it, we can pass the module namespace string as the first argument to the helpers so that all bindings are done using that module as the context. The above can be simplified to:

    ...mapGetter('moduleA/client', {
        a: state => state.a
    });
    

提交回复
热议问题