So I have my BikeCardContainer in which when I click on button it should navigate to other page and send current object data
handleClick() {
console.log(this.props.bikes);
this.props.propdata.history.push({
pathname: '/Checkout',
state: this.props.bikes
});
}
and I want to know how to access this data in receiving page.
class Checkout extends Component {
constructor(props) {
super(props);
console.log(this.props.bikes)
this.state = {};
this.confirmClick = this.confirmClick.bind(this);
this.goBackClick = this.goBackClick.bind(this);
}