title: Download file by clicking a button in ReactJS
body: <p>I have a website built with ReactJS and there are some files (PDF,DOC etc) that I want to let visitors download.</p>
  
  <p>But simple <code>href</code> tag doesn't start the download, instead refresh the page.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;Button
            href="src/assets/files/exampleDoc.pdf"
            color="transparent"
            target="_blank"
            className={classes.navLink}
  &gt;</code></pre>
  </div>
  </div>
  </p>
  
  <ol>
  <li>Why the <code>href</code> tag doesn't work in reactJS to download files?</li>
  <li>How to download files with ReactJs using buttons?</li>
  </ol>