title: Promise pending when I try to pass API call from one component to another as a prop
body: <p>I am working on a large project and from examples within the project I've found some components pass API calls from one component to another as a prop. However they mostly do it using class components and not using hooks. I am more familiar with using hooks and functional components. Here I am working with two components one that is a class component and one that is a functional component Im building from scratch. I am trying to make the api call in the parent component :</p>
  <pre><code>class ProviderDashboard extends Component {
    constructor(props) {
      super(props);
      this.state = { unsignedNote: true };
      this.toggle = () =&gt;
        this.setState({ unsignedNote: false });
    }
  
  return (
        &lt;div&gt;
          {this.state.unsignedNote &amp;&amp;
          &lt;UnsignedNoteModal 
        onSubmit={this.toggle}
        getList={api.Encounters.unsignedEncounters}
        /&gt;}
          &lt;NavBar /&gt;
          &lt;div className=&quot;dashboard-container&quot;&gt;
            &lt;h4&gt;
              {&quot; &quot;}
              &lt;div className=&quot;header-icon float-left&quot;&gt;
                &lt;DashboardIcon /&gt;
              &lt;/div&gt;{&quot; &quot;}
              Dashboard{&quot; &quot;}
            &lt;/h4&gt;
   &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  }
  
  export default connect(
    mapStateToProps,
    mapDispatchToProps
  )(ProviderDashboard);
  </code></pre>
  <p>When I try to pass the <code>getList</code> and console.log it I get something that looks like this in my console. <code>ƒ unsignedEncounters() { return requests.get(&quot;/provider-encounters/unsigned-encounters&quot;); }</code>
  However if I pass the api call like this
  <code>getList={api.Encounters.unsignedEncounters(e =&gt; e)}</code>
  I get a promise fulfilled object with the response Im looking for buried in a bunch of functions in the console. Can someone explain what Im missing here?</p>