Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2019-03-10 22:24:04 +0300
committerFilipa Lacerda <filipa@gitlab.com>2019-03-10 22:24:04 +0300
commitcbe69e4324357529a450d9401eb176186813e78a (patch)
tree33a9afe4527e2bac110d8d41ee245c83a85060ba
parent253bad8cebc83ce0b011ffb61a060be985e1c196 (diff)
Updates how to export the state object
-rw-r--r--doc/development/fe_guide/vuex.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md
index 4b60ec80cb8..7b54fa6289c 100644
--- a/doc/development/fe_guide/vuex.md
+++ b/doc/development/fe_guide/vuex.md
@@ -52,7 +52,7 @@ The first thing you should do before writing any code is to design the state.
Often we need to provide data from haml to our Vue application. Let's store it in the state for better access.
```javascript
- export default {
+ export default () => ({
endpoint: null,
isLoading: false,
@@ -62,7 +62,7 @@ Often we need to provide data from haml to our Vue application. Let's store it i
errorAddingUser: false,
users: [],
- };
+ });
```
#### Access `state` properties