| flux pattern | 稳定变化模式 |
|---|---|
- Facebook discovered this the hard way and created the Flux pattern, which is what Vuex is based upon. And it can enhance your app.
- Scott Young discovered these learning methods and created the Holistic learning, which is what learn more, study less is based upon. And that can enhance your knowledge.
- If one component changes its state, and a distant relative is also using that same state, we need to communicate that change. There’s the default way of communicating events up and passing props down to share data, but that can become overly complicated.
- Even if we have been distant relatives, we need to communicate about money. You don’t want events up, you want passing props down. It’s overly complicated.
- One single source of truth, we can consolidate all of our state into one place. One location that contains the current state of our entire application.
- Learn more, study less is why we can consolidate much of knowledge into our brain.
- We need some standardization. Otherwise, changes to our State could be unpredictable and untraceable.
- I should think through top-down. As you know, changes in other people’s code could be unpredictable and untraceable.
- A State Management Pattern This is why Vuex provides a full state management pattern for a simple and standardized way to make state changes.
- Holistic learning is a way that we learn more, study less to enhance our ability.
