Commit a89df585 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'docs-patch-49' into 'master'

Updates how to export the state object

See merge request gitlab-org/gitlab-ce!25947
parents 99b813dd cbe69e43
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment