Hook to access the user's current location. The location updates automatically as the user moves.
Important: This hook does not request location permissions. You must request permissions separately before location data will be available.
The current location or null if location is not available
const currentLocation = useLocation();if (currentLocation) { console.log(`Lat: ${currentLocation.latitude}, Lon: ${currentLocation.longitude}`);} Copy
const currentLocation = useLocation();if (currentLocation) { console.log(`Lat: ${currentLocation.latitude}, Lon: ${currentLocation.longitude}`);}
Hook to access the user's current location. The location updates automatically as the user moves.
Important: This hook does not request location permissions. You must request permissions separately before location data will be available.