title: React Native importing function from another file
body: <p>I am wondering if I import a function from another file, am I also importing all the files that is imported in the file of the function? For example:</p>
  
  <p>auth.js</p>
  
  <pre><code>import React from 'react';
  import { AsyncStorage, View, Text, ScrollView, ... } from 'react-native';
  import ModuleA from './modules/ModuleA';
  import ModuleB from './modules/ModuleB';
  import Module99 from './modules/Module99;
  
  export const function1 = () =&gt; {
      {/* some function using ModuleA */}
  }
  
  export const function2 = (param) =&gt; {
      if(something)
          {/* some function using Module99 */}
      else
          {/* some function using ModuleB */}
  }
  </code></pre>
  
  <p>Screen.js</p>
  
  <pre><code>import React from 'react';
  import { function2 } from '../auth';
  
  export default class Screen extends React.Component {
      {/* use function2 in some function or render */
  }
  </code></pre>
  
  <p>My question is, when I import function2 from auth.js, am I importing all the modules and other files that is imported in auth.js? Or am I just importing the module that will be used by function2. </p>
  
  <p>Also, function2 will use different module depending on the param, by calling function2 from my Screen, will my Screen also import all modules, or just Module99 and moduleB, or just the specific module inside the if else statement?</p>
  
  <p>I have read a lot of the documentations on how importing works in react native but still couldn't really understand the flow.
  Thank you for all answers.</p>