Skip to content

Latest commit

 

History

History

geo-location

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

🎒 @hooks/geo-location

React hook to return geo location details

NPM version Travis License

Install

npm i @hooks/geo-location

Usage

useGeoLocation

useGeoLocation(options?: PositionOptions): [Position, PositionError]

Parameters

options?: PositionOptions

Passes PositionOptions through to the geolocation API - https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions

Return

Returns an array containing the position and any position error.