title: React download image instead of showing in a new tab
body: <p>In my react component I have a function which use <a href="https://www.npmjs.com/package/file-saver" rel="nofollow noreferrer">file-saver package</a> to save an array of files.</p>
  <p><strong>File-saver package installation:</strong></p>
  <pre><code>npm i file-saver
  </code></pre>
  <p><strong>My react component:</strong></p>
  <pre><code>import { saveAs } from 'file-saver'
  
  saveImg(urlArr){
      urlArr[0];
      let name = 'img' + 0 + '.jpg';
      saveAs(urlArr[0], name)
      urlArr[2];
      let name2 = 'img' + 2 + '.jpg';
      saveAs(urlArr[2], name2)
  }
  </code></pre>
  <p>, and it works but my expectation was downloading files instead of opening images in new browser tabs. I would like to trigger downloading from react component. How to force downloading? What are others libraries used for downloading?</p>