[docs] Update auto-subscriptions tutorial to explicitly say that subscribe returns unsubscribe (#6448)

pull/6487/head
Odee 4 years ago committed by GitHub
parent a6fbf7faf5
commit 287cccc450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,6 +11,7 @@ const unsubscribe = count.subscribe(value => {
count_value = value;
});
```
> Calling a `subscribe` method returns an `unsubscribe` function.
You now declared `unsubscribe`, but it still needs to be called, for example through the `onDestroy` [lifecycle hook](tutorial/ondestroy):

Loading…
Cancel
Save