import { Camera } from 'react-native-camera-kit';
export function Preview() {
return <Camera style={{ flex: 1 }} />;
}
import React, { useRef } from 'react';
import { Camera, type CameraApi } from 'react-native-camera-kit';
export function Snapper() {
const ref = useRef<CameraApi>(null);
return (
<>
<Camera ref={ref} style={{ flex: 1 }} />
<Button title="Snap" onPress={async () => {
const photo = await ref.current?.capture();
console.log(photo?.uri);
}} />
</>
);
}
Camera component (Fabric view wrapper).
Renders the live camera preview with props/events and exposes an imperative capture API via ref.
Common props: