react-native-region-picker-modal
TypeScript icon, indicating that this package has built-in type declarations

0.9.16 • Public • Published

react-native-country-picker-modal

The best Region Picker for React Native.


Description

This is a fork of react-native-country-picker-modal by Xavier Carpentier. It works fundamentally the same way as the Country Picker with the necessary tweaks to actually be a Region Picker.

Installation

$ npm install react-native-region-picker-modal

or

$ yarn add react-native-region-picker-modal

Basic Usage

WORK IN PROGRESS

import  React  from  'react';
import  RegionPicker  from  'react-native-region-picker-modal';
 
export  default  class  Example  extends  React.Component {
    constructor() {
        this.state  = {
      cca2: 'US',
      selectedRegion: 'NY'
        };
    }
 
  render() {
    return (
      <RegionPicker
        onChange={value  => {
              this.setState({selectedRegion: value.selectedRegion});
            this.props.navigation.navigate('Step2', {countryCode:             this.state.cca2, regionCode:  value.selectedRegion})
        }}
        showRegionNameWithFlag
        hideFlag
        transparent
        cca2={this.state.cca2}
        selectedRegion={this.state.selectedRegion}
        translation="eng"
      />
    )
  }
}

License

MIT

Package Sidebar

Install

npm i react-native-region-picker-modal

Weekly Downloads

3

Version

0.9.16

License

MIT

Unpacked Size

7.28 MB

Total Files

33

Last publish

Collaborators

  • thornus