React Native Fetch API not returning my calls
<p>Sorry for the joke in the title.</p>

<p>I am currently exploring the fetch API in react native, but I have bumped in to some issues which I cannot wrap my head around. </p>

<p>So, I am trying to get a message from a server, which I am calling with the fetch API in the following manner:</p>

<pre><code>var serverCommunicator = {
    test: function() {
        fetch(baseUrl  , {
          method: 'GET',
          headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json',
          }
        })
        .then((response) =&gt; response.text())
        .then((responseText) =&gt; {
             return (JSON.stringify(responseText));
        })
        .catch((error) =&gt; {
          console.warn(error);
        }).done();
    },
module.exports = serverCommunicator;
</code></pre>

<p>When I tested using only <code>console.log(responseText)</code> my log gave me the correct message. However, now when I wanna try to put the content in the code as a message in a View it does not return as expected. Calling it in the following manner:</p>

<pre><code>import Method from '../Services/Methods';
.
.
.
&lt;View style={styles.card}&gt;
   &lt;CardView
      message={Method.test()} 
    /&gt;
</code></pre>

<p>I can see how the function test is called properly when calling it like this, but for some reason, it does not write the message.</p>