Skip to content

Remove defaultProps - it is causing errors #526

@KhrystynaPeryk

Description

@KhrystynaPeryk

Issue Description

When using CountryPicker, there are lots of errors in the console regarding defaultProps:

Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.

Steps to Reproduce / Code Snippets

Install the package in bare expo project
Import and use CountryPicker component

Expected Results

No errors in console

Additional Information

  • Nodejs version: 18.17.0
  • React version: 18.2.0
  • React Native version: 0.74.2
  • react-native-country-picker-modal version: 2.0.0
  • Platform(s) (iOS, Android, web, or all?): only tried on Android
  • TypeScript version: not used in my project

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