title: react js how to import only the required function from a file and not the all functions
body: <h2>this is my functions.js file</h2>
  
  <pre><code>export const f1 =()=&gt;
  {
  console.log('palashf1');
  }
  export const f2 =()=&gt;
  {
  console.log('palashf2');
  }
  </code></pre>
  
  <hr>
  
  <p>and this is the main js file for react application</p>
  
  <pre><code>import {f1} from './functions';
  </code></pre>
  
  <p>// using f1 somewhere</p>
  
  <hr>
  
  <p>when I go to console on my webpage and click the bundles I can see that f2 is also getting downloaded </p>
  
  <p>Is there any version of import method that allows us to download only the js function we need and not all the functions of the file from where we are importing ? </p>
  
  <p>creating a separate file for the function is the only solution ??</p>