Skip to content

Typescript error for Icon #478

@kickbk

Description

@kickbk

Getting

function(): JSX.Element
No overload matches this call.
  Overload 1 of 2, '(props: PickerSelectProps | Readonly<PickerSelectProps>): Picker', gave the following error.
    Type '() => JSX.Element' is not assignable to type 'ReactNode'.
  Overload 2 of 2, '(props: PickerSelectProps, context: any): Picker', gave the following error.
    Type '() => JSX.Element' is not assignable to type 'ReactNode'.ts(2769)
[SelectTime.tsx(116, 18): ]()Did you mean to call this expression?

when using like so:

<RNPickerSelect
  ...
  Icon={() => {
    return <Ionicons ... />;
  }}
/>

Any recommendations?

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