do i then still need to care about unsubscribing ?...
# redux
n
do i then still need to care about unsubscribing ? and what do i call for that ?
p
Yes, sorry that example didn't handle unsubscribe. The subscribers should always be unsubscribed after they are not needed.
Copy code
lateinit var subscription: StoreSubscription

subscription = store.subscribe { doSomethings(store.state) }

....
//later when not needed
subscription()  //this unsubscribes
👍 1