Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
703f4563
Commit
703f4563
authored
Apr 06, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update vuex.md
parent
44376b30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
doc/development/fe_guide/vuex.md
doc/development/fe_guide/vuex.md
+6
-5
No files found.
doc/development/fe_guide/vuex.md
View file @
703f4563
...
...
@@ -115,9 +115,13 @@ create:
1.
An action
`requestSomething`
, to toggle the loading state
1.
An action
`receiveSomethingSuccess`
, to handle the success callback
1.
An action
`receiveSomethingError`
, to handle the error callback
1.
An action
`fetchSomething`
to make the request.
1.
An action
`fetchSomething`
to make the request.
1.
In case your application does more than a
`GET`
request you can use these as examples:
1.
`PUT`
:
`createSomething`
2.
`POST`
:
`updateSomething`
3.
`DELETE`
:
`deleteSomething`
The component MUST only dispatch the
`fetchNamespace`
action.
The component MUST only dispatch the
`fetchNamespace`
action.
Actions namespaced with
`request`
or
`receive`
should not be called from the component
The
`fetch`
action will be responsible to dispatch
`requestNamespace`
,
`receiveNamespaceSuccess`
and
`receiveNamespaceError`
By following this pattern we guarantee:
...
...
@@ -144,9 +148,6 @@ import { mapActions } from 'vuex';
};
```
#### Handling errors with `createFlash`
// TODO
#### `mutations.js`
The mutations specify how the application state changes in response to actions sent to the store.
The only way to change state in a Vuex store should be by committing a mutation.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment