-->

Using redux-saga with react-router

2019-05-20 07:11发布

问题:

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. How should I use react-router in this case?

回答1:

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).

Something like...

yield put(push('your/route'))