{"action":"opened","issue":{"url":"https://api.github.com/repos/dvajs/dva/issues/325","repository_url":"https://api.github.com/repos/dvajs/dva","labels_url":"https://api.github.com/repos/dvajs/dva/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/dvajs/dva/issues/325/comments","events_url":"https://api.github.com/repos/dvajs/dva/issues/325/events","html_url":"https://github.com/dvajs/dva/issues/325","id":191869807,"number":325,"title":"如何在执行请求完成后执行与model不再有关联的代码","user":{"login":"IveChen","id":1736282,"avatar_url":"https://avatars.githubusercontent.com/u/1736282?v=3","gravatar_id":"","url":"https://api.github.com/users/IveChen","html_url":"https://github.com/IveChen","followers_url":"https://api.github.com/users/IveChen/followers","following_url":"https://api.github.com/users/IveChen/following{/other_user}","gists_url":"https://api.github.com/users/IveChen/gists{/gist_id}","starred_url":"https://api.github.com/users/IveChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IveChen/subscriptions","organizations_url":"https://api.github.com/users/IveChen/orgs","repos_url":"https://api.github.com/users/IveChen/repos","events_url":"https://api.github.com/users/IveChen/events{/privacy}","received_events_url":"https://api.github.com/users/IveChen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-27T16:19:44Z","updated_at":"2016-11-27T16:19:44Z","closed_at":null,"body":"比如有这么一个场景：我用antd的message组件https://ant.design/components/message/，这个组件是用js调用的方式没非标签实现的，我需要在登陆成功后显示一条提示信息，如果我是用redux-thunk，那么我可以再dispatch后执行Promise的then来执行相关的代码，而用dva的话，这段逻辑貌似我只能写在effects里面，能有不那么耦合的方式来做类似这种处理么？(当然很大原因都是因为我对于redux-saga的不熟悉)\r\n还有另外一个问题就是，我需要在登出的时候重置所有的model为初始state,以前用传统写法的话我可以封装一个方法来做这个处理，因为我可以在reducers中判断是不是action.type 为 logout，而在现在的时候因为你都用了namespace，所以我没找到一个能够通用的方式来做这个动作,总不能再logout的时候把每个model的lougout effect都执行一遍吧。。？"}}
{"actor":{"display_login":"IveChen"}}