@tempots/ui
UseLocation() function
A hook that provides the current location data to the given function.
Signature:
UseLocation: (fn: (location: Prop<LocationData>) => TNode) => import('@tempots/dom').Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
fn |
(location: Prop<LocationData>) => TNode |
The function that receives the location data. |
Returns: import('@tempots/dom').Renderable
A function that can be used to clean up the resources when the location changes.