Skip to content

Getting a warning when using Picker: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component? #1714

Closed
@helpse

Description

@helpse

Describe the bug

I'm getting a warning when using Picker:

ERROR Warning: forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?

To Reproduce

Steps to reproduce the behavior:

  1. Use Picker and Picker.Item from the lib

Expected behavior

No warnings

Code snippet

<Picker
    label="Type"
    floatingPlaceholder
    enableModalBlur={false}
    topBarProps={{title: 'Type'}}
>
    {equipmentTypesFiltered.map(type => (
        <Picker.Item
            key={type.id}
            label={type.name}
            value={type.name}
        />
    ))}
</Picker>

Device (please complete the following information)

  • Device: Android Simulator
  • OS: Android

Additional context

Using the following package versions:

    "react-native": "0.64.3"
    "react-native-ui-lib": "^6.5.3"

Metadata

Metadata

Assignees

No one assigned

    Labels

    buga bug in one of the components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions