title: Javascript Onclick=window.open() function will open a new page every time I refresh the page?
body: <p>So I have a DIV element that, when pressed, I want to open a new tab in a different window. The only problem is, whenever the page is refreshed or any other div element is pressed, th function is initiated as well and opens a page in another window. I'll include my code below, but I'm not sure why this is happening seeing as how I'm using <code>onClick={window.open("https://www.thechinesewriter.com")</code> Like I said, I only want a new tab to open when the div is pressed, not when any other items on the page are clicked or even when the page itself is refreshed.</p>
  
  <pre><code>import React from "react";
  import "./Column1.css";
  
  class Column1 extends React.Component {
  
      render() {
          return(
              &lt;React.Fragment&gt;
                   &lt;div className="rectImage"&gt;
                       &lt;img className="imagePost" src={this.props.image} /&gt;   
                   &lt;/div&gt;
                   &lt;div onClick={window.open("https://www.thechinesewriter.com")} className="downloadBut1"&gt;
                       &lt;h2&gt;
                           Source
                       &lt;/h2&gt;
                   &lt;/div&gt;
                   &lt;div className="downloadBut2"&gt;
                       &lt;h2&gt;
                           Repository
                       &lt;/h2&gt;
                   &lt;/div&gt;
               &lt;/React.Fragment&gt; 
           )
       }     
  }
  
  export default Column1;
  </code></pre>