Home > @elux/react-web > IStore
IStore interface
Store实例
Signature:
export interface IStore<TStoreState extends StoreState = StoreState>
Properties
Property | Type | Description |
---|---|---|
active | boolean | 当前是否是激活状态 |
dispatch | Dispatch | 派发action |
getState | GetState<TStoreState> | 获取store的状态 |
router | IRouter<TStoreState> | 所属router |
sid | number | 实例ID |
state | TStoreState | 当前的Store状态 |
uid | number | ForkID |
Methods
Method | Description |
---|---|
destroy() | 销毁(框架会自动调用) |
getUncommittedState() | 获取暂时未提交到store的状态 |
mount(moduleName, env) | 在该store中挂载指定的model |