I’m trying to implement the screen below. The red border should only show when the camera is recording, but this crashes the phone on Android.
I think the problem is that if state changes, the camera needs to re-render (i.e.
this.state.isRecording changes to
this.camera.recordAsync is being called and it crashes the phone since the camera
ref also changes and so trying to start a recording on a camera that has been unmounted causes the device to crash.
I even tried to use the
setState second param callback, but this doesn’t work either and the screen just goes black.
Click record on the snack below on an Android device.
containerStyles inside the