React, Typescript, and Promises
<p>I am trying to write component that calls a webservice and returns some data asynchronously through a promise. once this promise is resolved, i would like to include the results in my component's render method. Ideally i think i would like the results of the promise to be passed into another component. IE; the result of the promise is a list of items. </p>

<p>One more thing - i am writing this React component using Typescript. </p>

<p>Currently i have the following code:</p>

<pre><code>componentWillMount() {
    let fooProps = listGetter.returnListData().then((response) =&gt; {
        return response;
    });
}

public render(): JSX.Element {
    &lt;div&gt;
        &lt;Foo ElementProperties={this.fooProps} /&gt;
    &lt;/div&gt;
}
</code></pre>

<p>However, this code errors out and displays "cannot assign null value to property". </p>

<p>What am I doing wrong? What is the best way to handle promise's and resolve them into components in REACT? </p>

<p>Thanks!</p>