多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 获取 state state 存储于 Store 中,可以使用 State 的 `store.getState()` 获取当前时刻的 state。 ```js import { createStore } from 'redux'; const store = createStore(fn); const state = store.getState(); ``` Redux 规定, 一个 state 对应一个 View。只要 state 相同,View 就相同。你知道 state,就知道 View 是什么样,反之亦然。