Potentially "Useful React hooks"!
- useGeolocation
- useWebWorker
- useNotification
- useFile
- useClipboard
- useRandomNumber
- usePipe
- useCompose
- useEllipsis
- useMeasurePerformance
- useSlugify
- useCase
- useColor
export const App = () => {
const error = (err: GeolocationPositionError) => {
console.error(err);
};
const [location, setlocation] = useState<GeoPosition>();
useGeolocation({ success: setlocation, error });
return (
<>
<p>Longitude: {location?.coords.longitude}</p>
<p>Latitude: {location?.coords.latitude}</p>
</>
);
};