简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM