Camera ref and state changes cause the camera to crash

Here is the basic snack example:

The app crashes in the above example when clicking the record button at the top of the camera view.

My guess is that the ref changes when I use setState to change this.state.isRecording and this causes the camera to stop recording triggering this line: const { uri } = await; but of course has changed.

But I need to hide the Record button when the camera is recording.

Any help is appreciated.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.