title: How to create helper file full of functions in react native?
body: <p>Though there is a similar question I am failing to create a file with multiple functions. Not sure if the method is already outdated or not as RN is evolving very fast. <a href="https://stackoverflow.com/questions/33539774/how-to-create-global-helper-function-in-react-native">How to create global helper function in react native?</a> </p>
  
  <p>I am new to React Native. </p>
  
  <p>What I want to do is to create a js file full of many reusable functions and then import it in components and call it from there.</p>
  
  <p>What I have been doing so far might look stupid but I know you will ask for it so here they are.</p>
  
  <p>I tried creating a class name Chandu and export it like this</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>'use strict';
  import React, { Component } from 'react';
  import {
    AppRegistry,
    Text,
    TextInput,
    View
  } from 'react-native';
  
  
  export default class Chandu extends Component {
  
    constructor(props){
      super(props);
      this.papoy = {
        a : 'aaa'
      },
      this.helloBandu = function(){
        console.log('Hello Bandu');
      },
    }
  
    helloChandu(){
      console.log('Hello Chandu');
    }
  }
  </code></pre>
  
  <p>And then I import it in any required Component.</p>
  
  <pre class="lang-js prettyprint-override"><code>import Chandu from './chandu';
  </code></pre>
  
  <p>And then call it like this </p>
  
  <pre class="lang-js prettyprint-override"><code>console.log(Chandu);
  console.log(Chandu.helloChandu);
  console.log(Chandu.helloBandu);
  console.log(Chandu.papoy);
  </code></pre>
  
  <p>The only thing that worked was the first console.log, which means that I'm importing the correct path, but not any others.</p>
  
  <p>What is the correct way to do this please?</p>