title: Getting type error :this.props.getMovieTree is not a function
body: <p>I am new to the react native &amp; redux trying to call a function but its giving me an error:</p>
  
  <pre><code> this.prop.getMovieTree is undefined.
  </code></pre>
  
  <p>When I double click on the getmovietree it redirects me to proper function. But it is giving an error on runtime &amp; crashes my app. When I <code>console.log(this.props)</code> it prints defined value but when I print console.log(this.props.getMovieTree()) this prints undefined.</p>
  
  <p>// IN App.js:</p>
  
  <pre><code>import {getMovieTree} from './src/actions/RestActions'
  export class App extends Component {
    static propTypes = {
      getMovieTree: PropTypes.func,
    };
    constructor(props) {
      super(props)
     }
  componentWillMount()
  {
  this.props.getMovieTree();//at this line getting error: getmovietree() is undefined
  
  }
  }
  const mapStateToProps = state =&gt; {
    const { movieList } = state;
  
    return {movieList};
  };
  export default connect(mapStateToProps,getMovieTree )(App);
  </code></pre>
  
  <p>//  In RestAction.js file:</p>
  
  <pre><code>import {MAGENTO_GET_MOVIE_TREE} from './types'
  import {magento} from '../magento'
    export const getMovieTree = () =&gt; {
    return async dispatch =&gt; {
      try {
        const customer = await magento.getMovieTreeCall();
        dispatch({
          type: MAGENTO_GET_MOVIE_TREE,
          payload: customer
        });
      } catch (error) {
        console.log(error);
      }
    };
  };
  </code></pre>
  
  <p>// In Index.js:</p>
  
  <pre><code>export default magento =&gt; {
  return{
      getMovieTreeCall : () =&gt; {
          return new Promise((resolve, reject) =&gt; {
           // const path = '/V1/AppVersion/';
  
            magento
              .send()
              .then(data =&gt; {
                resolve(data);
  
              })
              .catch(e =&gt; {
                console.log(e);
                reject(e);
              });
          });
        },
  };
  
  
  };
  
  
  
  In magento/index.js:
  
  
  
  
  class Magento {
  
      send(){
  
          fetch("https://api.themoviedb.org/3/movie/now_playing?api_key=55957fcf3ba81b137f8fc01ac5a31fb5&amp;language=en-US")
          .then(response =&gt; response.json())
          .then((responseJson) =&gt; {
              return response.json()
              // this.setState({
              //     loading: false,
              //     dataSource: responseJson.results
              // })
          })
          .catch(error =&gt; console.log(error))
      }
  
  
  }
  
  export const magento = new Magento();
  </code></pre>