react-router Page Jump , With request parameters

this.context.router.push({pathname:'/car_datail',state:{item:"hello"}});

pathname To jump to the page path , The parameters to be passed in jump can be put into state in

Use... On the second page this.props.location.state Get the last page pass parameters

react-router v4 in :

this.context.router.history.push()

import React, { Component, PropTypes } from "react";
export default class Home extends React.Component {
toAbout = () => {
this.context.router.history.push('about');
}
render() {
return (
<div>
<div>Home</div>
<div onClick={this.toAbout}>click to about</div>
</div>
);
}
} Home.contextTypes = {
router:React.PropTypes.object.isRequired
}

react More about passing parameters between pages

  1. jsp Passing parameters between pages Chinese code scrambling (zz)

      jsp Passing parameters between pages Chinese code scrambling 1. Pass parameters var url = "*****Test.jsp?param1="+encodeURI(encodeURI(str));// Yes ...

  2. ios There are four ways to transfer parameters between pages

    ios There are four ways to transfer parameters between pages 1. Use SharedApplication, Define a variable to pass . 2. Working with files , perhaps NSUserdefault To pass on 3. Through a singleton of class To pass on 4. adopt Dele ...

  3. JSP Passing parameters between pages 5 Methods

    JSP Passing parameters between pages is a common function , Sometimes more than one is needed JSP Passing parameters between pages . Here's how to do it . (1) Directly in URL Add... After request Such as :< a href="thexuan.jsp? ...

  4. jsp Passing parameters between pages

    JSP Passing parameters between pages is a common function , Sometimes more than one is needed JSP Passing parameters between pages . Here's how to do it . (1) Directly in URL Add... After request Such as :< a href="thexuan.jsp? ...

  5. .net Several commonly used methods of transferring parameters between pages in

    from :http://www.cnblogs.com/lxshanye/archive/2013/04/11/3014207.html Reference resources :http://www.cnblogs.com/zhangka ...

  6. ionic3+angular5 Passing parameters between pages

    One . How to jump from one page to another 1. Introduce Services import { NavController } from 'ionic-angular'; 2. initialization constructor(public na ...

  7. javascript Passing parameters between pages

    1. adopt URL Pass parameters Pass parameter page function setCity() { var str = document.getElementById("cityName"); if ( ...

  8. about vue and react“ Between pages ” Misunderstandings about delivering data

    Preface If we want to communicate between multiple tabs , have access to localStorage.cookie etc. , But can you use vue or react Well ? Conclusion The answer is NO, because vue and react Although you can “ Multiple ” Between pages ...

  9. ionic1 The problem of passing parameters between pages

    1.  $scope.routeinfo It's the parameter I want to pass -- To scheddulcontent This page goes to : $state.go( "scheddulcontent" , { 'rou ...

Random recommendation

  1. classical nav Navigation

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. C# Basic knowledge series 6 ( Static classes and static class members )

    Static class Static classes are basically the same as non static classes , But there's a difference : Static classes cannot be instantiated . in other words , Out of commission new Keyword to create variables of static class type . Because there are no instance variables , So use the class name itself to access members of a static class . for example , If it's called ...

  3. N Legal combination of brackets

    Recursive implementation , The following points need to be noted : 1. Recursive termination condition 2. Recursive relation This is actually a matter of permutation , It's just that the permutation needs to meet the conditions, and the number of left brackets cannot be less than the number of right brackets in each recursive call . There is another point that needs special attention , When it comes to recursive calls ...

  4. ( translate )Windsor Introductory tutorial --- The fifth part Add logging

    Introduce      Now we have the basic framework , It's time to add content , So the first thing we should consider is to add logging function to the application . We will use Windsor To configure the , In this part , You will learn Windsor Other functions besides . L ...

  5. 2016-04-25- Information system practice notes 5-CACHE Design an example

    layout: post title: 2016-04-25- Information system practice notes 5-CACHE Design an example key: 20160425 tags: Business scene CACHE Systems analysis The system design cache modi ...

  6. mock Basic use of data

    One . Application scenarios When we do a project ourselves , We will encounter the situation that the back end has not finished the data output or the interface has not been written well . You don't have a way to get data in the background , At this time, the front end has to write static simulation data by itself ( Fake data ).mockjs It's used to create fake data , His use ...

  7. hdoj1160 DP--LIS

    Topic link :http://acm.hdu.edu.cn/showproblem.php?pid=1160 Ideas : It's another LIS Practical problems in English Teaching , First pretreatment , according to w From smallest to largest , Then the original problem is transformed into finding the permutation LIS ...

  8. Use google chrome Fetching the data : Grab data from high schools across the country

    http://tomycat.github.io/blog/other/2014/05/28/use-google-chrome-capture-data.html

  9. tera term adopt ttl Script Automatically connect to the server ( from http://www.cnblogs.com/wxb0328/p/teraterm.html)

    from http://www.cnblogs.com/wxb0328/p/teraterm.html In today's company has been using tera term To connect to the server remotely , It's very convenient , Especially its ttl Automatic script configuration ...

  10. MAC OS===&gt;IntelliJ IDEA__ant__zookeeper Source code compilation

    1: To configure ant Environmental Science https://archive.apache.org/dist/ant/binaries/  Download files from the official website   1.10.0 The above needs JDK1.8 above Otherwise it will be reported Exception i ...