unsubscribe from Observable #108
-
Hi guys, I wonder how to unsubscribe from an observable as I don't seem to find the .unsubscribe() function. I'm using the mini-rx-store together with vue3.
so state$ is the observable which I get via select and it works as it should. But in my unmount function I'd now like to unsubscribe from that. Any advice? Regards Christian |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
ok I just answered it myself. I need to assign then I can call |
Beta Was this translation helpful? Give feedback.
-
Hi @theSilverFisch, cool that you are using MiniRx with Vue! Yes, you found the right answer. Maybe, also vue-rx could help to manage your subscriptions: https://github.com/vuejs/vue-rx |
Beta Was this translation helpful? Give feedback.
ok I just answered it myself. I need to assign
const subscriber = state$.subscribe(....)
then I can call
subscriber.unsubscribe()