From 301f61d92a8bfcd03b973948766c9f0bcef71db1 Mon Sep 17 00:00:00 2001 From: Himanshu Date: Fri, 2 May 2025 00:38:28 +0530 Subject: [PATCH] docs(useGeolocation): add import example for GeoLocationSensorState type --- docs/useGeolocation.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/useGeolocation.md b/docs/useGeolocation.md index 91ad346fb7..44ad2d58a8 100644 --- a/docs/useGeolocation.md +++ b/docs/useGeolocation.md @@ -23,3 +23,10 @@ const Demo = () => { ```ts useGeolocation(options: PositionOptions) ``` +## Types + +If you need to use the return type of `useGeolocation`, you can import the `GeoLocationSensorState` type directly from the hook module: + +```ts +import type { GeoLocationSensorState } from 'react-use/lib/useGeolocation'; +``` \ No newline at end of file