Answer the question
In order to leave comments, you need to log in
With the Geolocation API, the computer starts to slow down. Perhaps due to Vue?
In the App.vue file, the geolocation API is running during the created hook. After a while of running the application, the computer starts to slow down. I think that while the application is running, during the created hook, the geolocation process starts all the time and loads the computer. Is this possible, if so, how to solve the problem?
created() {
// Getting geolocation with GeoLocation API
this.$getLocation()
.then(coordinates => {
this.$store.commit("SET_LOCATION", coordinates);
this.$store.dispatch("getWeatherData");
})
.catch(function(error) {
console.log(error);
this.$store.dispatch("updateWeatherData", "New York");
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question