react-native-country

React-Native Country Selector


Keywords
react-native, ios, android
License
MIT
Install
npm install react-native-country@1.0.0

Documentation

react-native-country

React-Native Country Selector

Installation

npm install react-native-country

Usage

import { CountrySelector } from 'react-native-country';

// ...

  const [selectedCountry, setSelectedCountry] = React.useState(null);

  const handleSelectCountry = (country) => {
    setSelectedCountry(country);
  };

    return (
    <View style={styles.container}>
      <Text style={{ fontSize: 20, marginBottom: 20 }}>
        Selected Country: {selectedCountry?.name?.common || 'None'}
      </Text>
      <CountrySelector onSelect={handleSelectCountry} />
    </View>
  );

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library