
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
react-country-dropdown
Advanced tools
A simple react country selection dropdown component.
No external dependencies, just a clean functional component.
npm i react-country-dropdown
Check the full documentation and demo here.
import ReactCountryDropdown from "react-country-dropdown";
const Example = () => {
return (
<ReactCountryDropdown
defaultCountry="JP"
onSelect={(country) => console.log(country.name)}
/>
);
};
The <ReactCountryDropdown/>
component accepts only two props.
Name | Type | Required | Default | Description |
---|---|---|---|---|
defaultCountry | string | Yes | null | The default country code to be selected. |
onSelect | func | Yes | null | Callback function when a country is selected. Returns the country object. |
{
"name": "Japan",
"code": "JP",
"code2": "JPN",
"capital": "Tokyo",
"region": "Asia",
"citizen": "Japanese",
"flagUrl": "https://flagcdn.com/jp.svg",
"callingCodes": ["81"],
"timezones": ["UTC+09:00"],
"latlng": [36, 138],
"currencies": [{ "code": "JPY", "name": "Japanese yen", "symbol": "¥" }]
}
MIT © 2024 Rocktim Saikia
FAQs
A simple react country selection dropdown component
The npm package react-country-dropdown receives a total of 493 weekly downloads. As such, react-country-dropdown popularity was classified as not popular.
We found that react-country-dropdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.