v0.8.0-rc2 Release
Pre-release
Pre-release
ganigeorgiev
released this
07 Nov 18:15
·
155 commits
to master
since this release
Refactored the realtime handler per #pocketbase-954 to allow registering multiple subscriptions to the same topic.
The collection realtime handler api now is:
// subscribe:
pb.collection("foo").subscribe("*", (e) => {});
pb.collection("foo").subscribe("YOUR_RECORD_ID", (e) => {});
// unsubscribe:
pb.collection("foo").unsubscribe("YOUR_RECORD_ID"); // remove every "YOUR_RECORD_ID" subscription
pb.collection("foo").unsubscribe("*"); // remove every "*" topic subscription
pb.collection("foo").unsubscribe(); // remove every subscription in foo
Additionally, subscribe()
now return UnsubscribeFunc
that could be used to unsubscribe only from a single subscription listener.
The realtime handlers from v0.8.0-rc1 are soft-deprecated and will still work but there will be a console warning to replace them with their newer equivalent.