Ku Nole Ku Nole - 1 month ago 8
Javascript Question

I tried the following, and checked this.props in Table, but only seeing __proto__: Object in `this.props.routeParams`

I tried the following, and checked this.props in Table, but only seeing proto: Object in

this.props.routeParams
.I tried the following, and checked this.props in Table, but only seeing proto: Object in
this.props.routeParams
.I tried the following, and checked this.props in Table, but only seeing proto: Object in
this.props.routeParams
.

Answer

Home :

<Link to="/table" state={{query: userInfo}}>
  <div>
     Pass userInfo Object to Table Route
  </div>
</Link>

Table :

componentDidMount () { 
   console.log(
     this.props.location.state 
  ) //{query: userInfo}
}