ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 获取 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 是什么样,反之亦然。