title: How to pass parameters in React Function From 1 file to another
body: <p>I am newbie to reactjs and I would like to ask if it is possible to achieve this.</p>
  
  <p>I have two files, I would like to pass the ID from Home.js to DataModel.js</p>
  
  <p>Heres my code: </p>
  
  <p><strong>DataModel.js</strong></p>
  
  <pre><code>const axios = require('axios');
  const base_url = 'https://jsonplaceholder.typicode.com';
  
  function getUSers(id) {
      return axios.get(base_url + '/users/' + id)
  }
  
  export const getUSers = getUSers(id);
  </code></pre>
  
  <p>=================================</p>
  
  <p><strong>Home.js</strong></p>
  
  <pre><code>import { getUSers } from './DataModels';
  
  class Home extends Component {
  
  constructor(props){
      super(props);
  
          this.state = {
             records: ''
          }
     }
  
     render(){
           let id = 2;
  
           getUsers(id); // -----&gt; How to pass this ID? 
  
           return (
               &lt;div&gt;
                   //Codes
               &lt;/div&gt;
           );
      }
  }
  </code></pre>