-
Notifications
You must be signed in to change notification settings - Fork 76
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
Control.go 跳转新的路由地址A->B,如何携带参数,B页面如何接收参数 #93
Comments
有两种方式,一种是跳转B页面的时候,携带state,Link、Control.go都已经有支持实现;另一种,用redux这样的框架保存状态。 |
Control.history.push({ pathname: "StaffSuggestionDetail" , state: rowData.msgId}); |
1 similar comment
Control.history.push({ pathname: "StaffSuggestionDetail" , state: rowData.msgId}); |
@qijizhuimeng 目前可以使用Control.state读取,但是前提是已经跳转到下一个页面了(可以使用Control.history.go(1)跳转到下一个页面)。不过这样做的目的是什么?为什么不用Control.go(path, state)? |
是的,谢谢已经能够获取到state. |
再请教一下,通过Control.go(path, state)能够传递回调方法吗?如何做 |
@qijizhuimeng 路由跳转的回调方法目前无法提供,因为目前浏览器没有开放这样的API,可以自行监听history变化来实现类似功能:
|
最近在移动项目中需要使用缓存上一个页面的状态,但是跳转的时候,需要将A页面的信息发送到B页面,react-keeper是怎么实现的
The text was updated successfully, but these errors were encountered: