1.

What is state management in Vue.js and which library is commonly used in Vue for state management?

Answer»

The state is an important part of Vue applications since it is concerned with how data is passed among components. 

  • State MANAGEMENT - is putting all the shared states of components in one place so that there will only be a single source of truth. This helps in achieving consistency of the state between all components making use of it.  
  • Generally, state management is all about accessing, centralizing, and saving the state of the whole application in a STRUCTURED and organized way rather than passing it from one to another COMPONENT.  
  • The commonly used state management library in Vue is vuex but we can also CREATE our STORE and make it a single source of truth where every component using the state has access to the properties as well as the actions. 


Discussion

No Comment Found

Related InterviewSolutions