I have created a basic Vue application that is designed to connect to a NodeJS server using websockets.
My setup involves the use of socket.io-extended for handling the connections.
After following the documentation and implementing the websocket connection within a component, everything works fine when I refresh the page. However, I encounter an issue when navigating away from the websocket page using vue router and then returning back to it. The console displays the following error message:
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in mounted hook: "TypeError: this.$socket.$subscribe is not a function"
[More frames with various functions]
vue.runtime.esm.js?2b0e:1888 TypeError: this.$socket.$subscribe is not a function
at VueComponent.mounted (Index.vue?b484:23)
... (more lines of similar information)