Skip to content

Commit 92fba76

Browse files
authored
docs: clarify writable value is lost when destroyed
Closes #4610 Closes #4407
1 parent 5f584d1 commit 92fba76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

site/content/docs/03-run-time.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ const unsubscribe = count.subscribe(value => {
294294
unsubscribe(); // logs 'no more subscribers'
295295
```
296296

297+
Note that the value of a `writable` is lost when it is destroyed, for example when the page is refreshed. However, you can write your own logic to sync the value to for example the `localStorage`.
298+
297299
#### `readable`
298300

299301
```js

0 commit comments

Comments
 (0)