How thegamenicorus/react-native-phone-input works
React Native Phone Input is a reusable phone-number input component with country selection, flags, and number utilities. The main workflow is user entry into the input, optional formatting and country detection, then access to validation or number details; users can also select a country through the built-in picker or provide a custom picker. The README documents custom country data and picker integrations. Source excerpts show the component wiring and utility calls; the graph omits unverified implementation details of unsampled modules.
Main entry points: index.js Phone input · countryPicker.js Country picker · phoneNumber.js Phone number logic · country.js Country lookup
Components 11
Phone Input
- Phone input
lib/index.js - Country picker
lib/countryPicker.js - Component styles
lib/styles.js
Country Data
- Country lookup
lib/country.js - Country records
lib/resources/countries.json - Flag resources
lib/resources/flags/index.js
Number Utilities
- Phone number logic
lib/phoneNumber.js - Number type map
lib/resources/numberType.json
Other components
- App user
- Phone parsing library
- React Native UI
Connections 15
- App user → Phone input: uses
README.md - Phone input → Country picker: renders
lib/index.js - Phone input → Phone number logic: formats and checks
lib/index.js - Phone input → Country lookup: sets custom data
lib/index.js - Phone input → Flag resources: gets flags
lib/index.js - Phone input → Component styles: uses styles
lib/index.js - Country picker → Country lookup: lists countries
lib/countryPicker.js - Country picker → Component styles: uses styles
lib/countryPicker.js - Country picker → Phone input: submits selection
lib/index.js - Country lookup → Country records: loads records
lib/country.js - Phone number logic → Country lookup: looks up codes
lib/phoneNumber.js - Phone number logic → Number type map: maps number type
lib/phoneNumber.js - Phone number logic → Phone parsing library: parses and formats
lib/phoneNumber.js - Phone input → React Native UI: renders controls
lib/index.js - Country picker → React Native UI: renders modal
lib/countryPicker.js