New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
是否可以开放个接口,在new dva()的时候,给effect第二参数加入其他的属性 #48
Comments
import { routerRedux } from 'dva/router'; 然后在 effects 里: yield put(routerRedux.push('/app')); |
其实可以像 |
@helloyou2012 看实现,choo 里内置了 location:setLocation 的 reducer,和我们通过 routerRedux 的操作并没有太大区别吧。 |
恩,不过这样不用每次都 import routerRedux ,直接 put 就可以了 |
被你一说还真觉得有点麻烦,1.0 之后我想想怎么简化。 |
|
我就是觉得每次都要导进去有点麻烦。所以才这么问的,然而文字表达有问题 O__O "… |
同意 @nikogu 的说法, import { routerRedux } from 'dva/router'; 这样更加的直观, 太高程度的封装, 反而让人不知道来源了. |
@manwei-lww 我喜欢每次都导。反正也不麻烦。 |
是否可以开放个接口,在new dva()的时候,给effects 第二参数加入其他的属性
例如 history给传进去。
好吧,其实我只是想要effects可以调用history.push做跳转~
The text was updated successfully, but these errors were encountered: