[英]Using redux-saga with react-router
I have a question about react-router: for example, I want to redirect from Create form to Edit form after called to create api (using redux-saga) successfully. 我有一个关于react-router的问题:例如,我想成功调用后创建api(使用redux-saga),从Create窗体重定向到Edit窗体。 How should I use react-router in this case?
在这种情况下我应该如何使用react-router?
If you include also react-router-redux you can simply treat the page change as another redux action to call from saga (using the new push
API). 如果你还包括react-router-redux,你可以简单地将页面更改视为从saga调用的另一个redux操作(使用新的
push
API)。
Something like... 就像是...
yield put(push('your/route'))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.