Код: Выделить всё
const captureImage = async () => {
if (camRef) {
try {
const imgData = await camRef.current.takePictureAsync({
base64: false,
imageType: ImageType.png,
});
setImage(imgData);
} catch (err) {
console.log(err);
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/784 ... -sdk-50-51