You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The useHistoryState hook is useful for managing state with undo and redo
18
-
capabilities in React components. The hook offers functions like undo, redo,
19
-
set, and clear to interact with the state as well as other state related
20
-
values like canUndo and canRedo.
17
+
The useGeolocation hook is useful for accessing and monitoring the user's
18
+
geolocation (after they give permission) in a React application. By utilizing
19
+
the hook, developers can easily retrieve the user's current position,
20
+
including latitude, longitude, altitude, accuracy, heading, speed, and
21
+
timestamp.
21
22
</HookDescription>
22
23
23
24
<divclass="reference">
24
25
### Parameters
25
26
26
-
<divclass="table-container">
27
-
| Name | Type | Description |
28
-
| ------- | ------ | ----------- |
29
-
| options | object | This is an optional configuration object provided when calling `useGeolocation`. It is used when calling `navigator.geolocation.getCurrentPosition()` and `navigator.geolocation.watchPosition()`. Some of the attributes it accepts are `enableHighAccuracy`, `timeout`, and `maximumAge`. |
30
-
</div>
27
+
{""}
31
28
32
-
### Return Values
29
+
<divclass="table-container">
30
+
| Name | Type | Description || ------- | ------ | ----------- || options |
31
+
object | This is an optional configuration object provided when calling
32
+
`useGeolocation`. It is used when calling
33
+
`navigator.geolocation.getCurrentPosition()` and
34
+
`navigator.geolocation.watchPosition()`. Some of the attributes it accepts are
35
+
`enableHighAccuracy`, `timeout`, and `maximumAge`. |
36
+
</div>
33
37
34
-
The hook returns an object containing the following properties:
38
+
### Return Values
39
+
40
+
The hook returns an object containing the following properties:
0 commit comments