如题,dva-loading 在同时或陆续触发多个request事件时出现异常。
*fetch({ query = {} }, { call, put, select }) {}
*load({ query = {} }, { call, put, select }) {}
例如我同时触发以上两个effects,dva-loading状态异常,过早显示为false,其实这时第二个effects尚未完成。
不要使用全局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?
我稍微看了一下源码是会触发的,但是是被出发了两次, 我的理解正确吗
Most helpful comment
不要使用全局loading,
类似
先启用effects级别的loding
app.use(createLoading({ effects: true }));再
this.props.loading.effects['login/Signin']