Question #1:
How to create a uri with a link and a variable? My example is from an API.
<Image source={{uri: 'http://www.mypage.com/'+`${val.images.filename}`}} style={styles.imgProd} />
Question #2:
I would also like to know how to build the uri with a function like something like this.
makeImgUrl(value) {
if (value === '' || valueUrl === 'null') {
return ("http://www.mypage.com/defaultimg.jpg")
} else {
return ("http://www.mypage.com/"+${value})
}
}
<Image source={{uri: +makeImageUrl(val.images.filename)}} style={styles.imgProd} />