I am using versions
"react": "^0.13.3",
"react-router": "^0.13.3"
i want to receive the params in which it navigate
1)Navigation done properly
2)what when i try to use this.props.query.id for receiving arguments it show undefined.
upgrade to react-router v4 and ;
Use this instead:
this.props.location.search
if you have a URL like mysite.com/user/tweets?filter=top&origin=im
Doing:
console.log(this.props.location.search); //yields "?filter=top&origin=im"
Thus to get the value of "filter" or "origin", you need to use a package for parsing query strings because react-router doesn’t come with built-in support for parsing query strings. E.g. using 'query-string' library on NPM you can do:
import queryString from 'query-string';
const UrlQueryStrings = this.props.location.search;
const queryValues = queryString(UrlQueryStrings);
console.log(queryValues.filter); // Gives "top"
console.log(queryValues.origin); // Gives "im"
Use this:
this.props.location.query.id
console.log('id', this.props.location.query.id) inside render method, and check the result