Skip to content

defaultValues.countryCode does not accept reasonable types #2

@kevcube

Description

@kevcube

Hi, thanks for the great project!

In Expo I want to use useLocales()[0].regionCode?.toUpperCase() to get a user's default region and guess their preferred country code.

I am attempting to cast this to type Country (exported by this package), or type CountryCode exported by libPhoneNumberJs, but neither of these are accepted by the field, instead it only accepts a long string array.

In writing this I found my solution of type { CountryCode } from "react-native-country-picker-modal"; 😅 but maybe that type should be re-exported by this package, or merged with the type Country that this package exports.

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