docs: clarify writable value is lost when destroyed

Closes #4610
Closes #4407
pull/7738/head
Simon H 5 years ago committed by GitHub
parent e41ba9bdaa
commit 048b68c5b1

@ -294,6 +294,8 @@ const unsubscribe = count.subscribe(value => {
unsubscribe(); // logs 'no more subscribers'
```
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`.
#### `readable`
```js

Loading…
Cancel
Save