title: How pass array data to next page component on click?
body: <p>I am beginner in Reactjs, so I have less knowledge in this, so can anyone  help to solve my probleem? <code>clickMe()</code> function receives selected row data in array, data is print successfully in <code>console.log(item)</code> but now I want to pass this data to next page and display there. So please help suggest to me how I can do this.</p>
  <pre><code>class Datajc extends Component {
  constructor(props) {
      super(props)
  
      this.state = {
  
          Data:[
               {
                 id:1,
                 title:'abd',
                 name: 'abcd' 
               },
               {
                  id:2,
                  title:'asd',
                  name: 'asdfd' 
                },
                {
                  id:3,
                  title:'pqr',
                  name: 'pqrst' 
                }
           ]
      }
  }
  
  
  
  clickMe(item){
      const {history}=this.props;
      alert('clicked');
      console.log(item);
      history.push('/Infojc')
  
  }
  </code></pre>
  <p>Below I display array data in a table using a map function and try to access on click in <code>clickMe() </code>function:</p>
  <pre><code>    render() {
          return (
              &lt;div&gt;
                  &lt;h1&gt;welcome to React&lt;/h1&gt;
  
               &lt;table&gt;
                      &lt;tr&gt;
                          &lt;th&gt;ID&lt;/th&gt;
                          &lt;th&gt;Title&lt;/th&gt;
                          &lt;th&gt;Name&lt;/th&gt;
                      &lt;/tr&gt;
                  {
                      this.state.Data.map((item,index)=&gt;(
                      &lt;tr key={item.id}&gt;
                      &lt;Router&gt;    
                          &lt;td &gt;&lt;Link to={'Infojc'}&gt;&lt;a onClick={this.clickMe.bind(this,item)}&gt;{item.id}&lt;/a&gt;&lt;/Link&gt;&lt;/td&gt;
                      &lt;/Router&gt;
                          &lt;td &gt;{item.title}&lt;/td&gt;
                          &lt;td&gt;{item.name}&lt;/td&gt;
                      &lt;/tr&gt;
                  ))
                  }
                  &lt;/table&gt;
              &lt;/div&gt;
          )
      }
  }
  
  export default Datajc
  </code></pre>