Open snaveenkumardev opened 1 year ago
Added the imageUri in the useEffect Dependency to fetch the profile pic which is changed after the screen is mounted. As discussed I created another useEffect to fetch the profile pic and also removed the permissionGranted from the dependency.
Why you added the dependency - "permissionGranted, imageUri", I think it running one time is enough not to run for permissionGranted or imageUri state changes. useEffect(() => { // check whether the camera permission is granted const checkPermission = async () => { const { status } = await getCameraPermissionsAsync(); setPermissionGranted(status === 'granted'); }
}, [permissionGranted, imageUri]);