hooks
hooks copied to clipboard
REACT-NATIVE-HOOKS USECAMERAROLL
IM TRYING TO USE USECAMERAROLL HOW CAN I USE IT
import { useCameraRoll } from '@react-native-community/hooks'
const [photos, getPhotos, saveToCameraRoll] = useCameraRoll()
{
photos.map((photo, index) => /* render photos */)
}
<Button title='Get Photos' onPress={() => getPhotos()}>Get Photos</Button>
I'm not sure what the question is here, would you mind elaborating?
Yes thankyou bro this is the way defined in readMe i wanted to acess the device media files only photos i dont know how to use this hook any example ?
We have removed useCameraRoll in 3.0.0