Skip to content

'react-native-media-console' cannot be used as a JSX component. #132

@hasanalicansu

Description

@hasanalicansu

Description

Hello,
I'm encountering a TypeScript error when trying to use the library:

'MediaConsole' cannot be used as a JSX component.
Its type '(props: Omit<VideoPlayerProps, "animations">) => Element' is not a valid JSX element type.
Type '(props: Omit<VideoPlayerProps, "animations">) => Element' is not assignable to type '(props: any) => ReactNode | Promise'.
Type 'Element' is not assignable to type 'ReactNode | Promise'.
Property 'children' is missing in type 'ReactElement<any, any>' but required in type 'ReactPortal'.ts

Environment

TypeScript version: 5.0.4
React version: 79.2
Steps to Reproduce

Possible Fix

Here is a possible adjustment:

export declare const VideoPlayer: (props: Omit<VideoPlayerProps, 'animations'>) => React.JSX.Element; // instead JSX.Element

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions