0.1.1 • Published 29 days ago

react-native-country v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
29 days ago

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