Skip to content

Commit 46dfe9c

Browse files
committed
docs: add more clarity for getters in a module usage (#1874)
1 parent f567906 commit 46dfe9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/guide/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const moduleA = {
8484

8585
## Namespacing
8686

87-
By default, actions, mutations and getters inside modules are still registered under the **global namespace** - this allows multiple modules to react to the same mutation/action type.
87+
By default, actions and mutations are still registered under the **global namespace** - this allows multiple modules to react to the same action/mutation type. Getters are also registered in the global namespace by default. However, this currently has no functional purpose (it's as is to avoid breaking changes). You must be careful not to define two getters with the same name in different, non-namespaced modules, resulting in an error.
8888

8989
If you want your modules to be more self-contained or reusable, you can mark it as namespaced with `namespaced: true`. When the module is registered, all of its getters, actions and mutations will be automatically namespaced based on the path the module is registered at. For example:
9090

0 commit comments

Comments
 (0)