This article mainly introduces you to the relevant information aboutreact-router's implementation of jumppassing value. The article gives detailed sample code, which is of certain significance to everyone. Referring to the value of learning, friends in need can follow the editor to learn together.
Preface
This article mainly introduces the relevant content about react-router jump value transfer, and shares it for your reference and study. Let’s take a look at the detailed introduction:
react-router jump value passing
1.Introduction package
import {hashHistory} from ‘React-router'
2. Jump to pass value
handleClick = (value) => { hashHistory.push({ pathname: 'message/detailMessage', query: { title:value.title, time:value.time, text:value.text }, }) }
3.Receive value
console.info(this.props.location.query.title) console.info(this.props.location.query.time) console.info(this.props.location.query.text)
Summary
The above is the detailed content of Example of how react-router implements jump value transfer in JavaScript skills. For more information, please follow other related articles on the PHP Chinese website!