puneet-countries-details
v1.0.0
Published
This package will export useCountry Hook that can be used to fetch details of countries from countries API.
Downloads
2
Readme
puneet-countries-details
A ReactJS hook to get the country information.
How to use it?
You can use the project in this way:
Install
# with npm
npm install puneet-countries-details
# with yarn
yarn add puneet-countries-details
Usage
- Import the package in your app:
import { useCountry } from 'puneet-countries-details';
- Get the country infromation from the hook:
const { loading, error, country } = useCountry('Republic of India');