入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

react页面之间的跳转及传值

创建时间:2016-08-02 投稿人: 浏览次数:17894
   this.context.router.push({
      pathname: "/bb",
      query: { id: ID,             
               name:B,
},
   });
constructor(props, context) {
  super(props, context);
  this.id = ""+ (props.location.query) ? props.location.query.id : null;
  this.name = ""+ (props.location.query) ? props.location.query.name : null;

}
B.contextTypes = {router:()=> React.PropTypes.func.isRequired };


            
                
				
			
		
        	
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。