title: How do i choose import/export in React
body: <p>I want to use WebP when the user open the Page in Chrome
  and else it should be png.</p>
  
  <p>i found this Code:</p>
  
  <pre><code>var isChrome = !!window.chrome &amp;&amp; !!window.chrome.webstore
  </code></pre>
  
  <p>But i cant put an If-statement around export or import</p>
  
  <p>This is my Code so far:</p>
  
  <pre><code>import redditwebp from '../img/icons/reddit.webp';
  import redditpng from '../img/icons/reddit.png';
  
  var isChrome = !!window.chrome &amp;&amp; !!window.chrome.webstore;
  
  if(isChrome){
    export default {redditwebp}
  }
  else{
    export default {redditpng}
  }
  </code></pre>