Untitled
3 years ago in Plain Text
const pickImage = async () => {
let result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
allowsEditing: true,
aspect: [1, 1],
quality: 1,
    });
if (!result.cancelled) {
setImages([...images,result.uri]);
   }
  };
<FlatList
style={{flex:1}}
data={images}
renderItem={({item})=>(
<Image source={{uri:item}} style={{height:'50%',width:'50%'}}/>
)}
/>