zoux / vuex-analysis

🗃️ Centralized State Management for Vue.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vuex-analysis

核心要点:

  1. 利用 Vue.mixin beforeCreate 注入 store 到根实例和子实例。
  2. Store 采用的是模块集合(ModuleCollection)和模块(Module)的设计。
  3. new Store 的核心实现为 installModule(挂载 storeOptions)和 resetStoreVM(创建私有 Vue 实例)。
  4. store 依靠一个私有的 Vue 实例来实现响应式。

About

🗃️ Centralized State Management for Vue.js.

License:MIT License


Languages

Language:JavaScript 90.9%Language:TypeScript 8.7%Language:Shell 0.4%