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
If you need to unsubscribe from a whole family of topics, for example when route changes can leave old dynamic subscriptions behind, you can use `unsubscribeByPrefix`:
24
+
25
+
```javascript
26
+
importwebsocketfrom'@/websocket';
27
+
28
+
websocket.unsubscribeByPrefix('/topic-name/');
29
+
```
30
+
31
+
This will unsubscribe from all topics whose name starts with the prefix.
32
+
33
+
It is useful for dynamic topics like `/topic-name/<resourceId>/<recordId>` where a stale subscription can update the wrong page if component unmount does not happen exactly when you expect.
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/08-Plugins/26-agent.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
---
2
2
title: Agent
3
3
slug: /tutorial/Plugins/agent
4
+
sidebar_position: 0
4
5
---
5
6
6
7
> TODO: this plugin tutorial is in progress, some information might be missing, we are actively working on it now. If you have any questions regarding this plugin, please reach out to us in GitHub issues
0 commit comments