Skip to content

Instantly share code, notes, and snippets.

View oleg1994's full-sized avatar
🎯
Focusing

Oleg oleg1994

🎯
Focusing
View GitHub Profile
const [routeCoordinates, setRouteCoordinates] = useState([]);
useEffect(() => {
const getRoute = async () => {
const apiKey = process.env.EXPO_PUBLIC_googleMaps_ApiKey;
let userCoordinates = null;
try {
const location = await Location.getLastKnownPositionAsync();
userCoordinates = location;
} catch (error) {