title: How can I reference the getNext props in react-native by javascript?
body: <p>I have a cokebase like that, I wanna let callback render function in map reference the getNext props, how could I do it?</p>
  
  <pre><code>const render = ({ photoURL }) =&gt; {
    return(
      &lt;Image key={photoURL} resizeMode="contain" style={{flex: 1}} source={{uri: photoURL}}&gt;
        &lt;View style={{ flex: 1, marginLeft: 10, marginBottom: 20, flexDirection: "row", alignItems: "flex-end", justifyContent: "center"}}&gt;
          &lt;Button icon={{ name: "heart", type: "evilicon", color: "#ff0000", size: 70 }} backgroundColor="transparent" onPress={getNext} /&gt;
          &lt;Button icon={{ name: "close-o", type: "evilicon", color: "#ff0000", size: 70 }} backgroundColor="transparent" onPress={getNext} /&gt;
        &lt;/View&gt;
      &lt;/Image&gt;
    )
  }
  //const { image, view } = styles
  
  const Picture = ({ PHOTO_URLS, getNext}) =&gt; {
  
    return(
      &lt;View style={{flex: 1}}&gt;
        &lt;Carousel delay={2000} style={{ flex: 1, backgroundColor: "#ff1493" }} pageInfo autoplay={false} onAnimateNextPage={(p) =&gt; console.log(p)} &gt;
          {PHOTO_URLS.map(render)}
        &lt;/Carousel&gt; 
      &lt;/View&gt;
    )
  }
  
  export { Picture } 
  </code></pre>