Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.setState({ updatesEnabled: true }, () => {
this.watchId = Geolocation.watchPosition(
(position) => {
this.setState({ location: position });
console.log(position);
},
(error) => {
this.setState({ location: error });
console.log(error);
},
{ enableHighAccuracy: true, distanceFilter: 0, interval: 5000, fastestInterval: 2000 }
);
});
}