You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I'm using the JS-SDK(v1.8.4) with Parse-server(v2.2.9), I tried to subscribe to multiple queries at the same app page, I've noticed that for example:
If I subscribe only to Query A, I can later unsubscribe(as in using the method) from Query A and all is good(no further events will emitted), but If I subscribe to Query A, then I again subscribe to Query B, and now I want to unsubscribefrom Query A, I can't, events will still emitted.
If I subscribe to A then B, now I unsubscribe from B, no no further events will emitted for B, but I can't unsubscribe from A, I can call unsubscribe but events for A will emitted.
I don't know if this supposed to work like that(not implemented feature), anyway I just wanted to know if its a valid behavior?, for now the workaround is to delete the event from the subscription object, for example:
let subscription = (new Parse.Query('ObjectName')).subscribe();
subscription.on('create', data => {})
delete subscription ._events.create;
In the A, B case, you could use unsubscribe for B and delete for A.
The text was updated successfully, but these errors were encountered:
Hello everyone, I'm using the JS-SDK(v1.8.4) with Parse-server(v2.2.9), I tried to
subscribe
to multiple queries at the same app page, I've noticed that for example:If I
subscribe
only to Query A, I can laterunsubscribe
(as in using the method) from Query A and all is good(no further events will emitted), but If Isubscribe
to Query A, then I againsubscribe
to Query B, and now I want tounsubscribe
from Query A, I can't, events will still emitted.If I
subscribe
to A then B, now Iunsubscribe
from B, no no further events will emitted for B, but I can't unsubscribe from A, I can call unsubscribe but events for A will emitted.I don't know if this supposed to work like that(not implemented feature), anyway I just wanted to know if its a valid behavior?, for now the workaround is to delete the event from the subscription object, for example:
In the A, B case, you could use
unsubscribe
for B anddelete
for A.The text was updated successfully, but these errors were encountered: