Skip to content

errorMessages in props is not optional #63

@mst-mkt

Description

@mst-mkt

The errorMessages in the props of the Camera component is not optional.

Therefore, the following error occurs if props is omitted as follows.

 <Camera ref={cameraRef} />
Property 'errorMessages' is missing in type '{ ref: RefObject<CameraType>; aspectRatio: number; }' but required in type 'CameraProps'.ts

To resolve the error, it should be stated as such.

 <Camera ref={cameraRef} errorMessages={{}} />

The README is marked as optional, as shown below, so this is considered to be an implementation error.
https://github.com/purple-technology/react-camera-pro/blob/master/README.md?plain=1#L74

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions