Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for this.$socket.$subscribe undefined after navigating to another route #435

Closed
wants to merge 3 commits into from
Closed

Conversation

JoseRaffucci
Copy link

Fixes #431

Everything works as intended after removing the destroyed portion of the mixin.

@zburk
Copy link

zburk commented Mar 23, 2020

@JoseRaffucci @probil Was there a reason this was closed without merging it in? #431 still needs a fix...

@jerrami
Copy link

jerrami commented Apr 21, 2020

@probil @JoseRaffucci Can you please let us know if there are unknown consequences with this? I built with these changes (no longer deleting $subscribe & $unsubscribe) and it seems to solve all my issues with Vue router integration.

@JoseRaffucci
Copy link
Author

@zburk @jerrami The reason I closed it was two-fold, it seemed I had found another bug with the component having to do with dynamic events. I would register a dynamic event at the component mount and it would work the first time I navigated to the route but when I left for another route and came back the dynamic event would not work. The interesting thing was that through the plugin I could access the socket directly and register the event using its API. The second reason was that after almost a month, the pull request had not been reviewed so I assumed that I might have introduced an unintended bug and did not want to waste anyone's time.

I have since stopped using socket.io and decided to use SSE in my use case. Though I have used socket.io in the past in other frameworks and projects and think it is very well built. I can't reopen this pull request but maybe @probil will if my assumption about it introducing unwanted behavior is false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError: this.$socket.$unsubscribe is not a function
4 participants