3👍
Your Echo is attached to window
, Vue is not reloading page, it’s just switching it with JS, so your connection stills alive.
You should disconnect before leaving page, so just do it in beforeDestroy
hook. More about hooks here
Also if you need this connection everywhere you should not initialize it in mounted
, created
or elsewhere in Vue component, you can just create separate file or plugin for Vue, because that function will trigger each time you opening page.
- [Vuejs]-Vuejs onclick data redirection in Visual Studio Code
- [Vuejs]-Disable autocomplete on Vuetify v-text-field
Source:stackexchange.com