Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

85
Views
I want to track the distance i walk and i couldn't make that i'm trying to do that with react native so anyone could help me

i'm trying to make an app that count steps and distance and time and i couldn't find way to get distance in the counter (realtime) so i want any one to help me how to that .

import {useEffect, useState` } from "react"; import * as Location from "expo-location";enter code here

export default `useLocation` = () => {
  const [location, `setLocation`] = `useState`();

  const `getLocation` = async () => {
    try {
      const { granted } = await `Location`.`requestForegroundPermissionsAsync`();
      if (!granted) return;
      const {
        `coords`: { latitude, longitude },
      } = await `Location.getCurrentPositionAsync`();

      console.log(latitude, latitude);
      setLocation({ latitude, longitude });
    } catch (error) {
      console.log(error);
    }
  };

  const `updateLocation` = async () => {
    try {
  await `Locationx.startLocationUpdatesAsync();`

    } catch (error) {
      console.log(error);
    }
  };

  `useEffect`   (  ()   => {

    `getLocation`();

  }, []);
  return location;
};

    enter code here

`

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!