react使用hashHistory实现类似get方法带参数跳转
来源:互联网 发布:我的世界,java.net 编辑:程序博客网 时间:2024/06/05 17:42
主页router
<Route path="/apartmentReserve/:apartmentId" component={ApartmentReserve}/>
前一页引入hashHistory
import {hashHistory} from 'React-router'
btnClick:function () { hashHistory.push({ pathname: '/apartmentReserve/'+yourApartmentId, query: { name:yourApartmentname, price:yourApartmentprice }, })}
或者通过<Link>to 传参
<Link to={ { pathname:"/jump", hash:'#ahash', query:{foo: 'foo', boo:'boo'}, state:{data:'hello'} } } >点击跳转 </Link>
componentWillMount(){ apartmentData={
apartmentId:this.props.params.apartmentId,
name:this.props.location.query.name, price:this.props.location.query.price }}
主页router
<Route path="/apartmentReserve/:apartmentId" component={ApartmentReserve}/>
阅读全文
5 0
- react使用hashHistory实现类似get方法带参数跳转
- react---带参数跳转
- react-router带参数使用Link跳转并取出参数
- react-router hashHistory&browserHistory
- 使用openURL实现程序间带参数跳转详解
- 使用openURL实现程序间带参数跳转详解
- 使用openURL实现程序间带参数跳转详解
- React Native ---fetch 之GET请求带参数
- get方式带参数请求方法
- Retrofit 使用心得 @GET@POST带参数不带参数
- ReactNative基础(五)使用react-navigation实现页面的跳转、参数的传递(StackNavigator)
- ReactNative基础(五)使用react-navigation实现页面的跳转、参数的传递(StackNavigator
- IIS上设置301跳转,实现带参数跳转
- struts带参数跳转
- action 带参数跳转
- Struts2 带参数跳转
- Intent带参数跳转
- controller 带参数跳转
- iOS 异常处理机制
- 蚂蚁金服漆远首谈刚完成的AI重大突破及紧缺人才,呼吁国内多点技术性强的大会,少点网红
- Android常用工具之Logutils
- mysql exists和in效率问题
- Android 中关于微信分享功能 Android6.0手机SD卡的读写操作。
- react使用hashHistory实现类似get方法带参数跳转
- 创建so文件并加载
- css学习
- MVC5学习小记(3)--数据库操作
- ubuntu vi, vim 编辑器的使用
- 在try,catch,finally中return,throw覆盖的问题总结
- linux中fork()函数详解(原创!!实例讲解)
- eclipse代码自动补全
- 数学之路(2)-数据分析-R基础(1)