Nocturnal Pumpkin Maelstrom

    react-select-us-states

    0.1.2 • Public • Published

    React Select US States

    React HTML Select component for US State Selection.

    Installation

    The package can be installed via NPM:

    npm install react-select-us-states --save
    

    The list of US States were taken from here

    Sample Usage:

    import React, {Component} from 'react';
    import './App.css';
    import SelectUSState from 'react-select-us-states';
     
    class App extends Component {
     
      constructor(props) {
        super(props);
     
        this.setNewValue = this.setNewValue.bind(this);
      }
     
      setNewValue(newValue) {
        console.log('this is the State code:' + newValue);
      }
     
      render() {
        return (
          <p>
            Select a state: <SelectUSState id="myId" className="myClassName" onChange={this.setNewValue}/>
          </p>
        );
      }
    }
     
    export default App;
     

    Keywords

    none

    Install

    npm i react-select-us-states

    DownloadsWeekly Downloads

    330

    Version

    0.1.2

    License

    none

    Last publish

    Collaborators

    • pedrohidalgo