byCedric / office-marathon

Example app for background location tracking in Expo
MIT License
61 stars 15 forks source link

fix: infinite loop when polling location data #4

Closed byCedric closed 3 years ago

byCedric commented 3 years ago

Linked issue

Fixes #2

Additional context

This uses a workaround with useRef data to access it within a timer (setInterval). This allows us to access the (previous) location data without reinitializing the timer.

github-actions[bot] commented 3 years ago

Awesome! You can preview the PR here.