seunjay-countries-hook
v1.0.2
Published
A custom react hook to fetch a list of countries with details
Readme
seunjay-countries-hook
A custom react hook to get the country information.
How to use it?
You can use the project in this way:
Install
# with npm
npm install seunjay-countries-hook
# with yarn
yarn add seunjay-countries-hookUsage
- Import the package in your app:
import { useCountry } from "seunjay-countries-hook";- Get the country information from the hook:
const { loading, error, country } = useCountry('Nigeria')'