use-ipcoords
v1.0.11
Published
React Hook for getting coords over IP using geoJS
Downloads
88
Maintainers
Readme
use-ipcoords
React Hook for IP Geolocation lookup using GeoJS.
▶︎ demo
Installation
Using yarn
:
yarn add use-ipcoords
Using npm
:
npm i use-ipcoords --save
Usage
import React from 'react';
import { useIpCoords } from 'use-ipcoords'
export const Example = () => {
const {
latitudeIp,
longitudeIp
} = useIpCoords();
return (
<div>
latitudeIp : {latitudeIp}<br />
longitudeIp : {longitudeIp}<br />
</div>
);
};
License
MIT © Gords