Rank 1: Thread
Hi, i am not able to unsubscribe after the unmount, here is the code
const unsubscribe = client.subscribe(
`databases.${process.env.NEXT_PUBLIC_DATABASE_ID}.collections.${process.env.NEXT_PUBLIC_CHATS_COLLECTION}.documents`,
response => { console.log(response); }, )
return () => { unsubscribe(); console.log('unsubscribed'); } }, [])```
realtime connection staying the same in appwrite dashboard, even after unmount.