From f3900684a4a9f710f13b2bf7bf9bd40c9f3822e6 Mon Sep 17 00:00:00 2001 From: Mo Date: Sat, 11 Jul 2020 13:32:19 -0500 Subject: [PATCH] more explanations the unsubscribe needs to be explained here. In the API docs it says "will be unsubscribed when appropriate" when using $ store prefix, but it's not clear what does "appropriate" means. The API full note: "Any time you have a reference to a store, you can access its value inside a component by prefixing it with the $ character. This causes Svelte to declare the prefixed variable, and set up a store subscription that will be unsubscribed when appropriate." --- site/content/tutorial/08-stores/05-custom-stores/text.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/content/tutorial/08-stores/05-custom-stores/text.md b/site/content/tutorial/08-stores/05-custom-stores/text.md index febd0ad7f7..4ec1cade21 100644 --- a/site/content/tutorial/08-stores/05-custom-stores/text.md +++ b/site/content/tutorial/08-stores/05-custom-stores/text.md @@ -6,6 +6,8 @@ As long as an object correctly implements the `subscribe` method, it's a store. For example, the `count` store from our earlier example could include `increment`, `decrement` and `reset` methods and avoid exposing `set` and `update`: +[more explanations here] + ```js function createCount() { const { subscribe, set, update } = writable(0);