Currently, I am venturing into the world of Vuex and attempting to incorporate some API requests using this state management pattern.
Here is the structure I have set up:
Component.Vue
export default {
created() {
this.$store.dispatch('getData', {value: this.$route.params.title});
},
}
Vuex Store (contains the action responsible for handling the mutation triggering the api call)
actions: {
getData(context, payload) {
context.commit('getData', payload);
},
},
Everything seems to be functioning correctly as the content is successfully retrieved from the API and displayed on the page. However, upon inspecting the DevTools, an error message regarding a Timeout appears at regular intervals. The error message states the following:
sockjs.js?9be2:1606 GET net::ERR_CONNECTION_TIMED_OUT
Can you provide any insight into what might be causing this issue?
Thank you in advance!
Best regards, T.