diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 21:08:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-05 21:08:13 +0000 |
commit | d3c29eae5c389e36d4751539fad0462053fb2b20 (patch) | |
tree | cc3ae497193f9334d0bc6ee4224637102f6e0d4e /doc/development/fe_guide | |
parent | ad4dbe36445360521fc73a57df13bc8f12eeaa92 (diff) | |
download | gitlab-ce-d3c29eae5c389e36d4751539fad0462053fb2b20.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/fe_guide')
-rw-r--r-- | doc/development/fe_guide/vuex.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md index cd18091abdf..b69bbb8b527 100644 --- a/doc/development/fe_guide/vuex.md +++ b/doc/development/fe_guide/vuex.md @@ -1,6 +1,13 @@ # Vuex -To manage the state of an application you should use [Vuex][vuex-docs]. +When there's a clear benefit to separating state management from components (e.g. due to state complexity) we recommend using [Vuex][vuex-docs] over any other Flux pattern. Otherwise, feel free to manage state within the components. + +Vuex should be strongly considered when: +- You expect multiple parts of the application to react to state changes +- There's a need to share data between multiple components +- There are complex interactions with Backend, e.g. multiple API calls +- The app involves interacting with backend via both traditional REST API and GraphQL (especially when moving the REST API over to GraphQL is a pending backend task) + _Note:_ All of the below is explained in more detail in the official [Vuex documentation][vuex-docs]. |