title: Render images sources from parsed array of objects in react native
body: <p>I'm building a react native application which suppose to use some 'meta-data' objects as sources. I'm parsing each object in array and returning a JSX layout for each <code>item</code>. The only problem I have is how to provide  sources from images, since I have them stored locally and need to <code>require("link")</code> them. My code gives me error:</p>
  
  <pre><code>function loadModuleImplementation(moduleId, module) {
    moduleId = "../../../images/icons/photographer/Party.png"
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>class SelectScreen extends Component {
    props:Props;
  
  
    Details = [
          {
            "type": "Party",
            "image": "../../../images/icons/photographer/Party.png"
          },
          {
            "type": "Wedding",
            "image": "../../../images/icons/photographer/Wedding.png"
          },
          {
            "type": "Architecture",
            "image": "../../../images/icons/photographer/Arhitecture.png"
          },
          {
            "type": "Christening",
            "image": "../../../images/icons/photographer/Christening.png"
          }
    ];
  
    render() {
      let renderPhotoTypes = () =&gt; {
        let type = [];
  
        this.Details.map( ( item )=&gt; {
          type.push(
            &lt;View style={styles.imageSelectItem} key={item.type}&gt;
              &lt;TouchableWithoutFeedback&gt;
                &lt;View&gt;
                  &lt;View style={styles.imageContainer}&gt;
                    &lt;Image style={styles.image} source={require(item.image)}/&gt;
                  &lt;/View&gt;
                  &lt;Text style={styles.text}&gt;{item.type}&lt;/Text&gt;
                &lt;/View&gt;
              &lt;/TouchableWithoutFeedback&gt;
            &lt;/View&gt;
          );
        } );
  
        return type;
      };
  
      return (
        &lt;ScrollView style={styleGuide.containerMain}&gt;
          &lt;Text style={styleGuide.heading_1}&gt;
            Select type
          &lt;/Text&gt;
  
          &lt;View style={styles.imageSelectContainer}&gt;
            {renderPhotoTypes()}
          &lt;/View&gt;
        &lt;/ScrollView&gt;);
    }
  }
  </code></pre>
  
  <p>Versions: </p>
  
  <pre><code>  "dependencies": {
      "axios": "^0.12.0",
      "babel-relay-plugin": "^0.9.0",
      "buffer": "^4.6.0",
      "color": "^0.11.1",
      "invariant": "^2.2.1",
      "react": "~15.0.2",
      "react-native": "^0.26.1",
      "react-native-button": "^1.6.0",
      "react-native-drawer": "^2.2.3",
      "react-native-fbsdk": "^0.2.1",
      "react-native-message-bar": "^1.6.0",
      "react-native-radio-buttons": "^0.11.0",
      "react-native-vector-icons": "^2.0.3",
      "react-redux": "^4.4.5",
      "react-relay": "^0.9.0",
      "redux": "^3.5.2",
      "redux-logger": "^2.6.1",
      "redux-persist": "^3.2.2",
      "redux-thunk": "^2.1.0"
    }
  </code></pre>