dva-loading 在同时或陆续触发多个request事件时出现异常

Created on 2 Jul 2017  ·  2Comments  ·  Source: dvajs/dva

如题,dva-loading 在同时或陆续触发多个request事件时出现异常。

*fetch({ query = {} }, { call, put, select }) {}
*load({ query = {} }, { call, put, select }) {}

例如我同时触发以上两个effects,dva-loading状态异常,过早显示为false,其实这时第二个effects尚未完成。

bug dep(dva-loading)

Most helpful comment

不要使用全局loading,
类似
先启用effects级别的loding
app.use(createLoading({ effects: true }));

this.props.loading.effects['login/Signin']

All 2 comments

不要使用全局loading,
类似
先启用effects级别的loding
app.use(createLoading({ effects: true }));

this.props.loading.effects['login/Signin']

我可以问个问题吗?

对于this.props.loading.effects['login/xxxx']
有疑问是这个loading.effects['login/xxxx'] 会不会去触发 effect?
我稍微看了一下源码是会触发的,但是是被出发了两次, 我的理解正确吗

Was this page helpful?
0 / 5 - 0 ratings

Related issues

itiwll picture itiwll  ·  4Comments

kpaxqin picture kpaxqin  ·  3Comments

MiaoXingGua picture MiaoXingGua  ·  3Comments

huyawei picture huyawei  ·  3Comments

ljjsimon picture ljjsimon  ·  3Comments