A tiny fully customizable react hook which gives you full list of countries with their name, dial code, alpha-2 code and flag emoji.
npm install react-countries> A tiny fully customizable react hook which gives you full list of countries with their name, dial code, alpha-2 code and flag emoji.
 
- npm
``bash`
npm install --save react-countries
- yarn
`bash`
yarn add react-countries
A simple example of a component which you can copy-paste and take info about all countries.
`jsx
import { useCountries } from 'react-countries'
const App = () => {
const { countries } = useCountries()
return (
<>
API
- Country interface
`javascript
type country = {
name: string,
flag: string,
code: string,
dial_code: string,
}
``| Property | Type | Description |
| ------------------ | ---------------------------------------------- | ----------- |
| name | string | |
| flag | string | |
| code | string | |
| dial_code | string | |
MIT © hirenkvaghasiya
---