This is a library for get all countrys, states and citys of world.
Using npm:
npm i country-state-city-nextjs
import {
load,
countryProps,
stateProps,
cityProps,
getDataCountrys,
getRuteCountryImg,
getDataStates,
getDataStatesByCountry,
getDataCitys,
getDataCitysByStateAndCountry,
} from "country-state-city-nextjs";
- Download zip here
- Save Files in your repository
- Config .env with NEXT_PUBLIC_CSC=your_url_repository