diff --git a/src/Camera.tsx b/src/Camera.tsx index 7a04bee..a13bfb4 100644 --- a/src/Camera.tsx +++ b/src/Camera.tsx @@ -204,11 +204,20 @@ type RefType = React.Component & Readonly; * @component */ export class Camera extends React.PureComponent { + /** + * @internal + */ static displayName = 'Camera'; + /** + * @internal + */ displayName = Camera.displayName; private readonly ref: React.RefObject; + /** + * @internal + */ constructor(props: CameraProps) { super(props); this.state = { cameraId: undefined }; @@ -451,6 +460,9 @@ export class Camera extends React.PureComponent { } //#endregion + /** + * @internal + */ static getDerivedStateFromProps(props: CameraProps, state: CameraState): CameraState | null { const newCameraId = props.device.id; if (state.cameraId !== newCameraId) return { ...state, cameraId: newCameraId }; @@ -458,6 +470,9 @@ export class Camera extends React.PureComponent { return null; } + /** + * @internal + */ public render(): React.ReactNode { // We remove the big `device` object from the props because we only need to pass `cameraId` to native. const { device: _, ...props } = this.props;