I'm very new to React Native and working at modifying an app that was built for me. I have fixed an issue with camera ratio looking squashed on the screen, however now I'm getting an unhandled promise rejection error. Previously, this would start recording:
const startRecording = async () => {
setRecording(true);
camera.current;
const response = await camera.current.recordAsync(
However now it's saying Undefined is not an object( evaluating 'camera.current.recordAsync' startRecording$)
I assume it's because previously the camera was being defined as const camera = useRef();
whereas the ratio fix (from here) is using const [camera, setCamera] = useState(null);
but I'm not sure on how to correct it.