why is state visible to components?
问题 As I understand, the point of vuex is to guarantee the consistency of state, by exposing it to components only through mutations/actions/getters. However, components can directly manipulate $store.state without using mutations/actions - potentially making the state inconsistent. Why is vuex state exposed directly? 回答1: Using mutations / actions / getters etc is a suggested best practice but doesn't mean it has to be followed. It could be that you just want to read a value from the state at