title: Getting images from firebase storage and rendering them with a map function
body: <p>I current have a folder in my firebase storage that looks like this:
  <a href="https://i.stack.imgur.com/8QeIy.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I am trying to map through a cloud firestore collection and rendering a screen with list items that have the corresponding info and the image. My document field include IDs that have 0 and 1 for example so I have an easier method of finding the images that I have on firebase storage folder. This is the code I'm using to render:</p>
  
  <pre><code>renderAccordion() {
      return this.state.accordionarr.map((item,index) =&gt; {
        const url = this.returnurl(this.state.displaydatestringversion, item.id);
        return(
          &lt;View key={index}&gt;
            &lt;Accordion
              onChange={this.onChange}
              activeSections={this.state.activeSections}
            &gt;
              &lt;Accordion.Panel header= {item.name}&gt;
                &lt;List&gt;
                &lt;List.Item&gt;
                  &lt;Image
                  source = {{ uri: url }}
                  style = {styles.sizer}
                  &gt;&lt;/Image&gt;
                &lt;/List.Item&gt;
                  &lt;List.Item&gt;{item.protein}&lt;/List.Item&gt;
                  &lt;List.Item&gt;{item.carbohydrate}&lt;/List.Item&gt;
                &lt;/List&gt;
              &lt;/Accordion.Panel&gt;
            &lt;/Accordion&gt;
          &lt;/View&gt;
        );
      });
    }
  </code></pre>
  
  <p>In the (item,index) you can assume the fields of item look like this:
  <a href="https://i.stack.imgur.com/dQQ6J.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Also, if you check the second line there is a method call returnurl. That looks like this:</p>
  
  <pre><code>returnurl = async(date, id) =&gt; {
      var ref = firebase.storage().ref(date+'/'+id+".jpg");
      const url = await ref.getDownloadURL();
      return url;
    }
  </code></pre>
  
  <p>I am currently getting an error message of "of type NSMutableDictionary cannot be converted to a valid URL.
  What is wrong with my code? Or is there a more efficient way of mapping through a field and finding/downloading the image url to render the screen?</p>