Issue
I have an array of image URI.
["file:///data/user/0/com.app.outlet/cache/react-native-image-crop-picker/22536474236950.png","file:///data/user/0/com.app.outlet/cache/react-native-image-crop-picker/22583225016770.png"]
I want to render the image component based on the length of the array and show and show all the images. How can I do it in react native
Solution
I believe this will help you:
var array = ["file:///data/user/0/com.app.outlet/cache/react-native-image-crop-picker/22536474236950.png","file:///data/user/0/com.app.outlet/cache/react-native-image-crop-picker/22583225016770.png"]
array.map((x)=>{
return(<Image source={x || whatever you want } style={{xx:"xx"}} />)
})
Answered By - Tanveerbyn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.