Camera

const Camera: MemoExoticComponent<(__namedParameters: CameraViewProps) => ReactElement>

The <Camera /> component.

This is a convenience wrapper around useCamera(...) that adds a PreviewView, wraps methods in a CameraRef, and supports updating zoom and exposure via Reanimated SharedValues.

Example

function App() {
  const camera = useRef<CameraRef>(null)
  const device = useCameraDevice('back')
  const photoOutput = usePhotoOutput()

  return (
    <Camera
      style={StyleSheet.absoluteFill}
      ref={camera}
      device={device}
      outputs={[photoOutput]}
      isActive={true}
    />
  )
}