Vuex: Why do we write mutations, actions and getters in uppercase?
1 answer
It is a lengthy coding style for writing constants in all uppercase letters.
In the Vuex documentation:
The commonly observed pattern uses constants for mutation types in various Flux implementations. This allows you to use code from tools such as lint, and putting all the constants in one file allows your employees to get an idea of ββwhat mutations are possible throughout the application.
So, this is only really after the long tradition of uppercase naming constants for the most part. This is not required.
Using constants is mostly preferred - this can be useful in large projects with many developers, but it's completely optional if you don't like it.
+5
source to share