react-geolocation
Declarative geolocation in React.
Install
Basic Usage
Props
enableHighAccuracy boolean
timeout number
maximumAge number
render function
render
is a function that receives an object as its only argument.
The object contains the following keys:
lazy boolean
If true then the component will not perform the fetch on mount.
You must use the getCurrentPosition
named argument in order to initiate the request.
onSuccess function
callback called on success. Its only argument is position
onError function
callback called on error. Its only argument is error