You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
I am still using this in react-native to force GPS geolocation updates.
componentDidMount() {
try {
// Use timer to force GPS update
// watchPosition updates too slowly, maybe every 10 seconds
this.setInterval(() => {
try {
if (this.state.killTimerMixin) { return; }
this.geoWatchStop();
this.geoWatchStart();
} catch (error) {
// Exception is thrown when database item this view was displaying is deleted in another view.
// ToDo: How to stop and shut down the TimerMixin ?
this.clearTimeout(); // < clearTimeout does NOT stop it
}
}, 3000);
Activity
nuthinking commentedon Feb 27, 2018
And doesn't seem to work in ES6
esutton commentedon Mar 6, 2018
What are react native timer alternatives?
I am still using this in react-native to force GPS geolocation updates.