Home > @elux/react-web > effect
effect() function
申明effect
Signature:
export declare function effect(loadingKey?: string | null): Function;
Parameters
Parameter | Type | Description |
---|---|---|
loadingKey | string | null | 将该 effect 执行状态作为 LoadingState 注入指定的 ModuleState 中。 |
Returns:
Function
返回ES6装饰器
Example
@effect('this.searchTableLoading')
将该 effect 执行状态注入本模块的searchTableLoading
状态中@effect()
等于@effect('stage.globalLoading')
@effect(null)
不跟踪其执行状态