react-html5-camera-photo icon indicating copy to clipboard operation
react-html5-camera-photo copied to clipboard

'Camera' cannot be used as a JSX component.

Open manutzsong opened this issue 11 months ago • 0 comments

'Camera' cannot be used as a JSX component.
  Its type 'FC<CameraProps>' is not a valid JSX element type.
    Type 'FunctionComponent<CameraProps>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.
      Type 'import("c:/Users/manut/Documents/GitHub/nattaya-monorepo/web/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.ReactNode'.
        Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
          Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.

Probably need to change export type from this export const Camera: FC<CameraProps> to export const Camera: React.FC<React.PropsWithChildren<CameraProps>>;

manutzsong avatar Mar 02 '24 07:03 manutzsong