title: Open a component in new window on a click in react
body: <p>I have a component which displays a data. I have to open this component in a new window on clicking a button/ link from a parent component. </p>
  
  <pre><code>export default class Parent extends Component {
      construtor(props) {
          super(props);
      }
  
      viewData = () =&gt; {
          window.open('childcomponent.js','Data','height=250,width=250');
      }
  
      render() {
          return (
              &lt;div&gt; &lt;a onclick={this.viewData}&gt;View Data&lt;/a&gt;&lt;/div&gt;
          )
      }
  }
  </code></pre>
  
  <p>I dont know how to invoke another component and also display it in a new size specified window. </p>
  
  <p>Actually I need to send a props to that child component with which it will fetch me the data from database and render it.</p>