title: on button click display react table
body: <p>I have one react table with subcomponent,
      in subcomponent, I am having 2 buttons on click of each button need to show react table,
      please help me with this.</p>
  
  <pre><code>ex:
  class Sample extends React{
  firstFun=()=&gt;{
  return &lt;ReactTable data={} columns={columns}
  }
  secondFun=()=&gt;{
  return &lt;Reacttable data={} columns={columns}
  }
  subcompo=()=&gt;{
  // some code
  &lt;bt1 onclick={this.firstFun}/&gt;
  &lt;bt2 onclick={this.secondFun}/&gt;
  }
  render(){
  return(
  &lt;ReactTable
  data={}
  submcomponent={this.subcompo}
  /&gt;
  )}
  }
  </code></pre>