REACT country dropdown react - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution
join us

country dropdown using react


 1053

REACT


3

// you must install: npm install react-country-region-selector --save

import React from 'react';
import { CountryDropdown, RegionDropdown } from 'react-country-region-selector';

class App extends React.Component {
constructor (props) {
super(props);
this.state = { country: '' };
}

selectCountry (val) {
this.setState({ country: val });
}

render () {
const { country, region } = this.state;
return (
<div>
<CountryDropdown
value={country}
onChange={(val) => this.selectCountry(val)} />
</div>
);
}
}

export default App;


By        
The power of the user (%)
17%



The most helpful REACT solutions

How to get client ip address using react ?How to get client ip address using react ?REACT

Click to see more ...

  15.5K     421

how to get the type of a device using react ?how to get the type of a device using react ?REACT

Click to see more ...

  1.9K     214

create digital clock reactcreate digital clock reactREACT

Click to see more ...

  1.4K     141

country dropdown using reactcountry dropdown using reactREACT

Click to see more ...

  1.1K     127

create alarm clock using reactcreate alarm clock using reactREACT

Click to see more ...

  3.8K     113

How to get latitude and longitude using react/javascript ?How to get latitude and longitude using react/javascript ?REACT

Click to see more ...

  868     108

get client country reactget client country reactREACT

Click to see more ...

  608     82

get ip address reactget ip address reactREACT

Click to see more ...

  799     81

time ago reacttime ago reactREACT

Click to see more ...

  442     74

detect mobile device reactdetect mobile device reactREACT

Click to see more ...

  432     58

Welcome aboard!
We are happy you are here and
wish you good net-raft!